Closed bengsparks closed 2 months ago
I think I have the same issue, not sure if my config is wrong: https://github.com/cowprotocol/services/blob/a88873892a962d5aab54dff79f7485bbd3e03756/crates/solvers/src/api/mod.rs#L52-L67
After cargo build
, the yml file is changed, and there are no schemas...
https://github.com/cowprotocol/services/blob/utoipauto/broken-example/crates/solvers/openapi.yml
Should be fixed in the new 0.1.11 release Does it work ?
Should be fixed in the new 0.1.11 release Does it work ?
Hi, are you asking if the new 0.1.11 release works? According to crates.io, the latest version of this crate is still 0.1.10
Should be fixed in the new 0.1.11 release Does it work ?
Hi, are you asking if the new 0.1.11 release works? According to crates.io, the latest version of this crate is still 0.1.10
v0.1.11 is now availble on crates.io Does it work?
Rebuilding my MRE repo with v0.1.11 looks good on my end; thanks very much
@ProbablyClem I think this can be closed now.
It seems the detection of
utoipa::ToSchema
is buggy. I have uploaded an MRE here that I invite you to try out at your convenience.Generating and comparing both
openapi.working.yaml
andopenapi.broken.yaml
indicate that the latter is missing the schema for thePerson
struct, whereas the former includes it.It seems the discovery mechanism of
utoipauto
fails to account for the fully qualified reference toutoipa::ToSchema
, and only matches onToSchema
. I suspect the issue lies somewhere here? I also assume the same bug affects discovery ofutoipa::ToResponse