-
Notifications
You must be signed in to change notification settings - Fork 155
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
Adding a new optional property to the request/response body is considered backward incompatible. #264
Comments
@ekadetov Thanks for reporting this! Could you please provide a minimal example OpenAPI specification to demonstrate the issue? |
Hi, Old:
New (it adds
|
@dcustura I would argue that in the case of PUT an optional field is indeed an incompatible change. Omitting an optional field has semantic meaning for PUT. Clients that used PUT according to the old spec need to be aware that there is a new optional field that needs to be handled. |
@thake I based my comment on the semantic of PUT method which basically means replacing the resource with the representation provided by the client. I can't explain it better than here https://stackoverflow.com/questions/62229223/rest-does-the-put-method-have-to-remove-an-optional-field-when-it-is-omitted But I wish the behaviour of openapi-diff had this configurable, or at least mark the incompatibility with a less severe score, so that the user of this tool could decide whether this is an incompatible change. |
Hie, were you able to solve this problem? |
Hi,
Why adding a new optional property (with default value) is considered to be an incompatible change?
I really do not see why the diff tool reports it as an incompatible change?
The text was updated successfully, but these errors were encountered: