-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
While working on my own spec with the beta rust-axum generator, I encountered lots of models generated that look like
pub struct ModelName(Box<serde_json::value::RawValue>)
Obviously, the struct is public but
- The value inside is not
- The value inside is opaque, especially in an AnyOf case
I actually came across similar structs in the examples:
openapi-generator/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs
Line 804 in 278d7ae
| pub struct AnyOfHashMapObject(Box<serde_json::value::RawValue>); |
I would appreciate someone explaining the right way to discriminate these structs into the real types.
This is a request for documentation on how to use generated models like this when implementing a server api with the rust-axum generated traits.
Closing this issue would mean that we (I, at least, have) sufficient documentation on implementing a server based on the rust-axum generator.
I considered filing this as a bug report as an alternative, but I do not know enough about the intention of the model design to say this is a bug.