-
Notifications
You must be signed in to change notification settings - Fork 220
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
Invalid inline schema defined in oneOf according to spec #346
Comments
Not sure about this. Probably depending on generation library itself. According to spec enums are allowed to have inlined schemas as well or references. Way I have validated the spec is basically checked it with editor.swagger.io to see whether it gives any lint errors. Since the rust types are so flexible it also depends on how you have defined your enum. For tagged enums with But more context to this would be appreciated, like what kind of enum you have defined, and what is the code generation library you have used here? Perhaps I will find time to investigate this in future, but I cannot promise anything. |
Related to #617 |
@affanshahid I commented on another issue related to this discriminator thing. I'd like some ideas of regarding how to solve this, see #621 (comment) |
Going to be fixed in #1059 as explained here #617 (comment) |
Trying to use OpenAPI Generator CLI for my API which has some enums with type tag. I'm getting the following error:
This leads to invalid type generation for enums. I am assuming this is because utoipa generates an inline schema for enums whereas according to the spec it should use $refs?
Any workarounds?
The text was updated successfully, but these errors were encountered: