Closed ipconfiger closed 1 month ago
@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
@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. tks pls close it
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?