Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable incompatibility checks #552

Merged
merged 27 commits into from
Dec 16, 2023

Conversation

westse
Copy link
Contributor

@westse westse commented Jul 26, 2023

config-file and config-prop CLI options

  • Gives user fine-grained control of what constitutes an incompatibile change.

Maven plugin config parameters

  • configFiles param for a separate yaml config file Corresponds to CLI --config-file option.
  • configProps param for specifying config props in pom.xml. Corresponds to CLI --config-prop option.
  • OpenApiDiffMojoTest updated to verify parameters work.

Relies on recent exhaustive testing of incompatible checks to ensure no regressions (see #545).

Fix #551
Fix #550
Fix #303

westse added 25 commits July 26, 2023 11:11
- Gives user fine-grained control of what constitutes an incompatibile change.
- configFiles param for a separate yaml config file Corresponds to CLI --config-file option.
- configProps param for specifying config props in pom.xml. Corresponds to CLI --config-prop option.
- OpenApiDiffMojoTest updated to verify parameters work.
- Adds BackwardIncompatibleProp enum with first values
- TestUtils.assertSpecIncompatible() utility to assert incompatible when the supplied BackwardIncompatibleProp is true, and to assert changed-but-compatibile when false.
- EnumBCTest updated to test with BackwardIncompatibleProp enabled and disabled.
- Some incompatible conditions checked for by ChangedSchema did not seem to be reachable when creating unit tests for them. Leaving logic in place to avoid unintentional behavior change, but left in comments.
- Responses should be incompatible if a numeric range widens.
- See OpenAPITools#550
- See later commit which makes configurable the enabling/disabling of this incompatibility check (disabled by default to avoid a breaking change)
- See OpenAPITools#550
- Makes configurable the enabling/disabling of this incompatibility check (disabled by default to avoid a breaking change)
- Note: Using existing OPENAPI_ENDPOINTS_DECREASED property instead of creating a new one since decreasing paths is detected as a decrease in endpoints anyway.
- Note: Using existing OPENAPI_ENDPOINTS_DECREASED property instead of creating a new one since decreasing path operations is detected as a decrease in endpoints anyway.
@westse
Copy link
Contributor Author

westse commented Oct 4, 2023

Any feedback on this? To make it easier I curated each commit to be bite-size - so I recommend looking at each commit instead of all files at once (which I can image would seem daunting).

@joschi joschi added this to the 2.1.0 milestone Dec 16, 2023
Copy link
Collaborator

@joschi joschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@westse Thanks a lot for your contribution!

I'll merge this PR without real in-depth review. Let's figure out if it broke anything afterwards and there are quite some tests for it as well. 👍

@joschi joschi merged commit dc6ad56 into OpenAPITools:master Dec 16, 2023
6 checks passed
@wing328
Copy link
Member

wing328 commented Dec 19, 2023

@westse Thanks for the PR. FYI #598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants