Feature: Allow changed operation IDs to be flagged as incompatible #880
+101
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When checking a schema for backwards compatibility, changed operation IDs are not flagged as incompatible. Rather, they are detected as a metadata change (see #189) - and therefore not a breaking change. I would like to add a config property to upgrade the change level to
INCOMPATIBLEif an operation ID is changed. This is because generated API clients typically use the operation ID to refer to operations, so this would be a breaking change for the generated client.I appreciate that this may not be desirable behaviour for all users, so I have made the new config property (
incompatible.operation.id.changed) default tofalse(the previous behaviour).This is my first time contributing to this repo, so please let me know if I've missed something or approached this from the wrong angle.
Summary by cubic
Adds a config flag to treat changed operationId as a breaking change for client generators. Default behavior stays the same and treats operationId changes as metadata.
Written for commit 76947e0. Summary will update on new commits.