-
Notifications
You must be signed in to change notification settings - Fork 191
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
Will utopia support generic types?seem's not work #1049
Comments
@ipconfiger The short answer is yes via aliases. See the docs: https://docs.rs/utoipa/latest/utoipa/derive.ToSchema.html#generic-schemas-with-aliases However there is coming new support regarding generics in coming 5.0.0 release: #1034 #1048 https://github.com/juhaku/utoipa/tree/master/utoipa-config |
seems not that convinient, why not support generic type directly. just like the example above. |
There is plenty of discussion around the generics in the old issues. But to answer the why it was not the simpliest thing to implement. Yet the 5.0.0 will bring about support for generic params directly. |
@ipconfiger Can this be considered solved? I so this could be closed as I need to get the dragging issues count down. |
I tried, it work. |
I have a struct
when i use another struct such as :
so i can assembly a response as Response and it will generate a json response like below:
i want use Response in utopia.path macro:
but in docs, it show example like that:
and the schema:
so, Will utopia support generic types? what i miss?
The text was updated successfully, but these errors were encountered: