-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Generics produce invalid OpenAPI identifiers #318
Comments
It works fine in |
@sunli829 what's the best workaround? Currently, we use openapi-generator. Getting the same issue as @Eugeny did. |
@sunli829 can we transform for example |
Maybe the Object derive macro could also accept an |
This looks good 🙂 |
Currently the only solution is to avoid using generics. 🙂 |
@Eugeny are you interested in implementing this? |
No, I've already worked around it by just modifying the generated JSON schema in my code. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Just pinging to keep the issue alive. |
@sunli829 Do you have some time to look at this? |
This problem can currently only be solved by avoiding the use of generics. 🙂 |
pinging to keep the issue alive. |
ping again :) |
Having a generic type with
#[derive(Object)]
will produce identifiers likePaginatedResponse<SessionSnapshot>
which look nice, but are not valid according to the spec:It would be nicer to allow renaming them at the specialization site with an
[oai(rename)]
, or allow forcing the definition to be inlined in the spec.The text was updated successfully, but these errors were encountered: