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

Do not fail with breaking changes when major version is bumped #460

Open
jdnvn opened this issue Feb 3, 2023 · 2 comments
Open

Do not fail with breaking changes when major version is bumped #460

jdnvn opened this issue Feb 3, 2023 · 2 comments

Comments

@jdnvn
Copy link

jdnvn commented Feb 3, 2023

Hello!

I was wondering if it makes sense to pass the diff check if there are breaking changes, but the major version has been bumped. Right now, I am planning to use this as a required workflow on GitHub PRs and I want to give developers the opportunity to get around the check if they bump the version.

Would love this as a potential built in feature or option when running.

Thanks

@joschi
Copy link
Contributor

joschi commented Feb 25, 2023

@jdnvn Thanks for this suggestion!

I like the idea, but one issue I see is that info.version is a string with no inherent semantics:

version string REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).

https://swagger.io/specification/#info-object

This means that even if OpenAPI Diff knew what semantic versioning is, there's no guarantee that the info.version field actually does contain one.

For all practical purposes, the following values are valid "versions": one, two, foobar1.

Any suggestions how this change should work in these cases?
Maybe an explicit flag which assumes info.version is a semver string and fail otherwise?

@igokoro
Copy link

igokoro commented Mar 6, 2023

Is version change something that can be implemented as SPI extension? There's very little documentation for ExtensionDiff, so it's hard to tell if it's got enough information/power to override the diff produced by the tool.

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

No branches or pull requests

3 participants