OpenAPITools / OpenAPITools/openapi-diff

PUT new attribute backwards compatibility optional

Open
#251 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Breaking/Non-Breaking classification question
Dominant language
Java
Stars
1.1k
Forks
190
PR merge metrics
No merged PRs in 30d

Description

https://github.com/OpenAPITools/openapi-diff/issues/136 made the PUT request incompatibility check stricter, considering an additional field as a breaking change. This makes sense for a scenario where updates are taking place, but is too strict if PUTs represent only inserts.

What would be the best way of optionally removing the strict handling of PUTs? Options could include:

  • Surfacing more information about how the changedOperation.isIncompatible() decision was made, allowing the user of the OpenApiDiff to use more granular information to decide whether it should be considered as a breaking change.
  • Adding a command-line flag to remove the PUT strictness for all cases in a run.
  • Writing some code to traverse the object graph for PUTs when the diff has completed and decide whether the strict PUT handling is what caused the incompatibility, and then ignore 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 tracing how changedOperation.isIncompatible() handles added fields in PUT requests and how that result reaches the completed diff. Compare the proposed approaches: exposing granular incompatibility information, adding a command-line flag, or traversing the object graph after diffing. Done means one chosen design is specified and its behavior for insert-only and update-style PUTs is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.