Skip to content

Incorrect enum values in generated schema. #131

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

Open
gitFurious opened this issue Sep 16, 2017 · 5 comments · May be fixed by #191
Open

Incorrect enum values in generated schema. #131

gitFurious opened this issue Sep 16, 2017 · 5 comments · May be fixed by #191

Comments

@gitFurious
Copy link

The enum values in the generated schemas are currently string types but the API responds with integers.

The schema currently has strings:

"enum": [ "0", "1", "2", "4", "10", "254", "-1" ],

but should have integer values:

"enum": [ 0, 1, 2, 4, 10, 254, -1 ],

This causes issues with code-generation and model validation.

@vthornheart-bng
Copy link
Contributor

Good finds! I'll take a look as soon as I can put my attention back on schema quality improvements.

@zhirsch zhirsch linked a pull request Oct 1, 2017 that will close this issue
@ahl
Copy link

ahl commented Sep 14, 2023

This threw me for a loop as well trying to generate a Rust SDK based on the OpenAPI document. I would be happy to submit a PR that addresses this if you'd be amenable. Thanks!

@github-actions github-actions bot added the stale label Dec 19, 2024
Copy link

github-actions bot commented Apr 3, 2025

This issue was closed because it has been inactive for one week since being marked as stale.

@github-actions github-actions bot closed this as completed Apr 3, 2025
@ahl
Copy link

ahl commented Apr 3, 2025

This was marked as completed, but the bug is still there.

@aadam-bng aadam-bng removed the stale label Apr 3, 2025
@aadam-bng aadam-bng reopened this Apr 3, 2025
@ahl
Copy link

ahl commented Apr 3, 2025

Do you want a PR for this?

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.

4 participants