-
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
ENUM changes #303
Comments
@jackbilestech Changes to enums are not breaking in every programming language or in Java it is breaking and causes runtime errors. That is why Zalando works with There are numerous solutions on the market, but no official ones in the OpenAPI standard. |
See also: #292 (comment) While it's up to the specific implementation of clients how to act on the change, adding a previously invalid value to an existing enum is a breaking change in my opinion. |
We might be able to reach a decision here, but can we add a parameter to the CLI to allow us to treat ENUM as a breaking change or not. Something similar to https://openapi-generator.tech/docs/generators/java |
To echo what @doshidhaval said, an enum addition can be considered a compatible change if a This gets thornier when considering evolution over time however (imagine changing a default enum value to something that previously didn't exist). |
- Addresses issue OpenAPITools#303 - Default behavior unchanged to not allow response enum additions. - Adds option to allow response enum additions, both in CLI and programmatically - Tests added for new behavior related to lenient vs strict response enum behavior - Tests also added for request enum behavior (which has been left unchanged).
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
Discussed in #292
Originally posted by Roman-Bober November 25, 2021
Hi,
I wonder why enum changes gives "brocken backward compatability"
Shouldn't be if enum is added at the end of enum list it should be backward compatible?
Thank you,
Roman
I too am seeing the above issue whe appending an item to a string enum.
The text was updated successfully, but these errors were encountered: