utoipa
utoipa copied to clipboard
Params Vec<String> are not passed to swaggerUI correctly
#[derive(Debug, Deserialize, IntoParams)]
pub struct VecTEST {
mint_assets: Vec<std::string::String>,
}
#[utoipa::path(
get,
path = "/vec_test",
params(VecTEST),
responses(
(status = 200, description = "List todos successfully")
)
)]
pub async fn vec_test(query: VecTEST) -> Result<impl Reply, Infallible> {
Ok(warp::reply::json(&json!(query.mint_assets)))
}
utoipa = { version = "4.1.0", features = ["chrono"] }
utoipa-swagger-ui = "4.0.0"
results in this swagger-ui:
Does the Warp work with arrays in the query parameters correctly?
Most frameworks without crutches do not work with arrays in the query parameters and offer to work with POST for pass arrays
Ok then i will try to change that from a GET to a POST and come back if there are still issues