Skip to content

Conversation

@sunshowers
Copy link
Contributor

Fix the following cases:

  • new optional query param: forward-incompatible
  • a request body is removed: forward-incompatible
  • required changed between old and new bodies: backward or forward-incompatible, depending

Created using spr 1.3.6-beta.1
@sunshowers sunshowers requested a review from ahl January 24, 2026 00:02
Comment on lines +136 to +137
// New optional parameters are forward-incompatible because new clients
// might send the parameter to old servers that don't understand it.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had thought that old servers would just ignore those parameters... which is true, but probably means that new clients aren't getting the semantics they expect.

src/compare.rs Outdated
new_body_or_ref.resolve(new_request_body.context())?;

// Check if the required field changed.
if !old_body.required && new_body.required {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if I had it to do over, I would have destructured old_body and new_body to force us to consider each property explicitly (which would have made it harder to miss this case).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done -- also reported description and extensions changes as trivial ones.

Created using spr 1.3.6-beta.1
@sunshowers sunshowers merged commit 6bd236d into main Jan 24, 2026
8 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/fix-some-missing-optional-required-cases-new-optional-query-param branch January 24, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants