OpenAPITools / openapi-diff

Utility for comparing two OpenAPI specifications.
Apache License 2.0
809 stars 154 forks source link

Treat new PUT request properties as compatible #537

Closed westse closed 1 year ago

westse commented 1 year ago

Currently new PUT request properties are treated as incompatible. This is due to #136 (with PR #137) which appear invalid in intent, implementation, and test.

In theory one could argue that some servers might enforce the "SHOULD NOT" language of the spec by returning validation errors where they didn't before, and this would constitute an API breakage. But that should be discussed in a different issue.

mas-chen commented 1 year ago

+1, or at least have this configurable since this breaks a lot of users. It has been previously reported in

https://github.com/OpenAPITools/openapi-diff/issues/490 https://github.com/OpenAPITools/openapi-diff/issues/264 https://github.com/OpenAPITools/openapi-diff/issues/251

mas-chen commented 1 year ago

Linking your fix here: https://github.com/OpenAPITools/openapi-diff/pull/538

mas-chen commented 1 year ago

@joschi do you think you could help get this fix in? Or there another workaround?

westse commented 1 year ago

@mas-chen Agreed on the configurability. On this note, I'm working on a PR to enable/disable via configuration each individual backward incompatible checks. (It builds on #546 which exhaustively tests each check). Stay tuned.

mas-chen commented 1 year ago

Thank you @westse @joschi!

mas-chen commented 1 year ago

@joschi will we have a beta release soon? I'm eager to test this out!

joschi commented 1 year ago

@joschi will we have a beta release soon? I'm eager to test this out!

See https://github.com/OpenAPITools/openapi-diff/releases/tag/2.1.0-beta.7. Maven Central should be synced in a few minutes to hours.