utoipa
utoipa copied to clipboard
Response body Any
It looks like setting the response body to Any
doesn't work as expected, it tries to reference it as a component.
responses(
(status = 200, body = Any)
)
True, Any
as a response body or request body does nothing at the moment. It only works in value_type
. Probably the support could be enhanced
@kellpossible With this I'm thinking should we ignore the type specific parsing implementation which is used for response body and request body and some other thing if not mistaken. And instead use the one that is used for value_type
?
This would allow users to define the type for reponses as a Rust type itself which might be a double edged sword. While it would give users a freedom when defining the types, it same time allows users to define "invalid" types what will render as broken OpenAPI specificaiton when viewing.
Support for recognizing body = Object
should become available with the #408.