OpenAPITools / OpenAPITools/openapi-diff

False positive breaking change when making a required request body optional

Open
#329 0 comments 6 reactions 0 assignees View on GitHub

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

If the request body of an operation changes from required to optional, the change will be detected as an incompatible change.

I argue that this is a false positive, because existing clients are still able to communicate as before.

If this issue is accepted, I would be happy to contribute a PR to fix it :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by creating or locating a pair of OpenAPI specifications where an operation's request body changes from required to optional, then run the comparison that reports breaking changes. Trace the compatibility result for that request-body change and inspect nearby tests. Done means the change is no longer reported as incompatible while other request-body incompatibilities remain detected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.