-
Notifications
You must be signed in to change notification settings - Fork 156
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
Configurable incompatibility checks #552
Conversation
- 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.
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). |
There was a problem hiding this 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. 👍
config-file and config-prop CLI options
Maven plugin config parameters
Relies on recent exhaustive testing of incompatible checks to ensure no regressions (see #545).
Fix #551
Fix #550
Fix #303