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

Support unexpected values in Enums #692

Open
brice-laurencin opened this issue Mar 29, 2024 · 1 comment · May be fixed by #700
Open

Support unexpected values in Enums #692

brice-laurencin opened this issue Mar 29, 2024 · 1 comment · May be fixed by #700
Assignees
Labels
area:client This item is related to the client extension enhancement New feature or request

Comments

@brice-laurencin
Copy link

If the server evolves and adds (or, God forbid, deletes) entries in an enum, the client will likely fail hard.

It'd be interesting to add a default UNEXPECTED value in all the generated enum, this one being the default value when parsing fails.

I can try to cook a PR for this, if you think that's a sensible idea.

@ricardozanini
Copy link
Member

Feel free to experiment, @brice-laurencin. I'm curious about this use case since it's somewhat common. In my experience, usually the server would change the API to a new version e.g. /v2/petstore, then new clients can use this new endpoint and interface.

Changing the main version to not be compatible smells and it's an anti-pattern. So I'm not sure how much resources we should spend on this.

@ricardozanini ricardozanini added enhancement New feature or request area:client This item is related to the client extension labels Apr 3, 2024
brice-laurencin added a commit to brice-laurencin/quarkus-openapi-generator that referenced this issue Apr 12, 2024
@brice-laurencin brice-laurencin linked a pull request Apr 12, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:client This item is related to the client extension enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants