-
Notifications
You must be signed in to change notification settings - Fork 434
Clearly separate compatibility rules for input and output schemas. #851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| * Never change the semantic of fields (e.g. changing the semantic from | ||
| customer-number to customer-id, as both are different unique customer keys) | ||
| customer-number to customer-id, as both are different unique customer keys) | ||
| * Consider <<251>> in case a URL has to change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
7154a27 to
099c0c6
Compare
tfrauenstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for providing more clarity on compatible changes -- it is needed.
I provided some change proposals to further enhance clarity and avoid redundancies.
|
|
||
| * Add only optional, never mandatory fields. | ||
| * Never change the semantic of fields (e.g. changing the semantic from | ||
| customer-number to customer-id, as both are different unique customer keys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| customer-number to customer-id, as both are different unique customer keys) | |
| customer-number to customer-id, both being unique, but different customer keys) |
| * Never change the semantic of fields (e.g. changing the semantic from | ||
| customer-number to customer-id, as both are different unique customer keys) | ||
| customer-number to customer-id, as both are different unique customer keys) | ||
| * Consider <<251>> in case a URL has to change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| * Add only optional, never mandatory fields. | ||
| * Don't remove any fields. | ||
| * Don't make mandatory fields optional or make optional fields mandatory. | ||
| * Input fields may have (complex) constraints being validated via server-side | ||
| business logic. Never change the validation logic to be more restrictive and | ||
| make sure that all constraints are clearly defined in description. | ||
| * `enum` ranges can be reduced only if the server is ready to still accept and | ||
| handle old values. They **cannot** be extended. | ||
| * You <<112>> that are used for output parameters and likely to | ||
| be extended with growing functionality. The API definition should be updated | ||
| first before returning new values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Add only optional, never mandatory fields. | |
| * Don't remove any fields. | |
| * Don't make mandatory fields optional or make optional fields mandatory. | |
| * Input fields may have (complex) constraints being validated via server-side | |
| business logic. Never change the validation logic to be more restrictive and | |
| make sure that all constraints are clearly defined in description. | |
| * `enum` ranges can be reduced only if the server is ready to still accept and | |
| handle old values. They **cannot** be extended. | |
| * You <<112>> that are used for output parameters and likely to | |
| be extended with growing functionality. The API definition should be updated | |
| first before returning new values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is is a consequence of the sentence before, and redundant -- should be omitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the redundant information makes it easier to follow, was my idea. Though I also understand the desire to keep the rules shorter.
editorial changes: remove redundant text. Co-authored-by: Thomas Frauenstein <thomas.frauenstein@zalando.de>
editorial improvements about optional/mandatory fields Co-authored-by: Thomas Frauenstein <thomas.frauenstein@zalando.de>
editorial changes about mandatory/optional for output. Co-authored-by: Thomas Frauenstein <thomas.frauenstein@zalando.de>
remove redundand "when used for output". Co-authored-by: Thomas Frauenstein <thomas.frauenstein@zalando.de>
Co-authored-by: Thomas Frauenstein <thomas.frauenstein@zalando.de>
Triggered by a discussion in an internal chat (internal link), this makes it clearer which of the compatibility rules apply for input and output schemas, respectively.