coriolinus/openapi-gen

Axum `Query` handler parameters are not generated properly

Closed this issue · 0 comments

Given query parameters foo: Foo and bar: Bar, the generated handle parameters will look like: Query<Foo>, Query<Bar>, which is incorrect. There should only be a single instance of Query<T>, where T is a struct that aggregates all the query parameters like this:

#[derive(Deserialize)]
struct QueryParameters {
    foo: Foo,
    bar: Bar,
}

https://docs.rs/axum/latest/axum/extract/struct.Query.html#example