OpenAPITools / OpenAPITools/openapi-diff
Adding a new optional property to the request/response body is considered backward incompatible.
Open
Nobody has claimed this yet.
Breaking/Non-Breaking classification
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Why adding a new optional property (with default value) is considered to be an incompatible change?
- V1 client sends a request without a new field - then the default value will be used by the V2 server - [OK]
- V1 client receives the response from the V2 server with a new field - it will simply be ignored by the V1 client - [OK]
I really do not see why the diff tool reports it as an incompatible change?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the compatibility report with two minimal OpenAPI specifications: one with the original request/response body and one adding an optional property with a default value. Trace how the diff tool classifies that request and response change, then confirm the result against the expected backward-compatibility behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100