Closed rodorgas closed 1 month ago
I am also interested in this
This is a missing feature, that has been implemented for responses but not for request body. This is something that should be added.
@rodorgas I was porting over my old Go Gin-based api to Rust using Axum. By default, Gin can accept multipart or json body for all requests.
By any chance, do you have code for Axum that does something similar? I was looking at using a Tower service to handle this but the dev experience overhead would be too high.
As a matter of fact, I had forgotten about this but there is a PR for the functionality: https://github.com/juhaku/utoipa/pull/876, it just needs some polish and it is done.
hello, many thanks for the fix! i'm referring to the dependency via git="...", rev="..."
in my Cargo.toml
, but wonder whether you're going to release/publish it as a 4.2.x version. or shall i wait for 5.0?
OpenAPI 3 allows describing multiple accepted content-types for a request (first example on this link).
Is it possible using utoipa?
I'd like to make an endpoint accepting both
application/json
andapplication/x-www-form-urlencoded
. I implemented it in Actix using two handlers and guards, but I don't see how to document it in utoipa.