Commit 57bf492
committed
Treat new PUT request properties as compatible.
Effectively reverts change for #136 which appears invalid in intent, implementation, and test.
- Invalid in intent: #136 claims that adding a readOnly property to the request body of a PUT request is a breaking change because clients will begin to omit it and the server will interpret the omission as a directive to delete the property. This is incorrect because the server should expect, [per the OAS spec](https://spec.openapis.org/oas/v3.0.3#fixed-fields-19), that readOnly properties "SHOULD NOT be sent as part of the request". So it would be a bug for the server to delete any data associated with the readOnly property. Regardless, the API is left unbroken if the server simply ignores readOnly properties.
- Invalid in implementation: the code treats as incompatible any PUT request property, not just readOnly properties.
- Invalid in test: no readOnly properties are tested.
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.1 parent fa2b18f commit 57bf492
File tree
4 files changed
+0
-169
lines changed- core/src
- main/java/org/openapitools/openapidiff/core/model
- test
- java/org/openapitools/openapidiff/core
- resources
4 files changed
+0
-169
lines changedLines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 159 | | |
164 | 160 | | |
165 | 161 | | |
| |||
Lines changed: 0 additions & 21 deletions
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments