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

Make incompatibility checks configurable #551

Closed
westse opened this issue Jul 26, 2023 · 2 comments · Fixed by #552
Closed

Make incompatibility checks configurable #551

westse opened this issue Jul 26, 2023 · 2 comments · Fixed by #552
Milestone

Comments

@westse
Copy link
Contributor

westse commented Jul 26, 2023

The ability to selectively enable or disable an incompatibility check is greatly needed because some checks are not appropriate for a given user's use case, and sometimes they are just incorrect (i.e., due to a bug that has not been fixed yet). A scan of this project's issues shows that configurability is a common request, so it is likely that adoption of and satisfaction with this project will be improved if this is addressed.

Additional benefits that may be realized:

  1. New disabled-by-default incompatibility checks may be added with confidence that no existing users will be broken. This safety net will encourage much more innovation than would otherwise occur.
  2. When openapi-diff itself needs a breaking change then users can easily and safely upgrade assuming previous behavior is still available via a config property.
  3. Any implementation will likely include a central enumeration of all incompatibility checks that can be enabled/disabled via configuration. This serves as a form of documentation which will increase user comprehension.
  4. The ability to set configurable properties can be used for other purposes beyond enabling/disabling incompatibility checks, without any extra code "plumbing". In contrast, adding a CLI or Maven option currently requires much more code, which does not encourage contribution.
@sokovnich
Copy link

This is a must-have feature to get changelog
between two major API versions (e.g. between /api/v1 and /api/v2).
Very useful.

@westse
Copy link
Contributor Author

westse commented Nov 17, 2023

Can this be merged? Or at least some feedback? Thanks. CC @joschi

@joschi joschi added this to the 2.1.0 milestone Dec 16, 2023
joschi pushed a commit that referenced this issue Dec 16, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants