-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Is it possible to define a generic enum ? #259
Comments
Currently not supported, I will add it later. |
I've added support for generic union in
|
There is only one problem:
Here is the code that demonstrates this problem https://github.com/szagi3891/poem-test/blob/master/src/main.rs#L148 |
If the object is generic, either specify the I'll add a validator to catch this problem at compile time. |
I understand. Would it be possible to make the inline attribute default to a type that is generic? |
Well, and if inline was added by default for types that have a generic parameter, it should nicely simplify this code. |
This is a breaking change 😂, I've improved it now, if you don't specify the |
Inline objects have the disadvantage that they cannot refer to themselves. |
This message at compile time will be very helpful.
Why is this a breaking change ? Until now, generic types have not been generated in the openapi specification (I guess). |
For |
Fixed in |
Thank you very much :) |
I would like to define a generic enum that I will use in the openapi specification.
I tried to define it this way:
When trying to compile I get errors:
Can I ask for help?
The text was updated successfully, but these errors were encountered: