You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating schemas for externally tagged enums containing struct variants, the oneOf block gets embedded inside additionalProperties instead of being top-level in the schema.
I tried to debug the proc macro, but my knowledge of Rust macros is fairly lacking and I wasn't able to track down the point where the schema gets generated. If you could point me in the right direction I could open a PR to fix this.
It's made on purpose. There may be parameters or description for the entire entity. And the generated code is valid according to the specification, and different code generators from swagger also accept this.
I know it's valid, but the documentation becomes lacking and the examples are all messed up by additionalProp1..N.
For instance, it doesn't show the accepted tag values (in this instance, first and second)
Is there a way to have them mapped correctly? Maybe a macro tag or something along those lines
When generating schemas for externally tagged enums containing struct variants, the
oneOf
block gets embedded insideadditionalProperties
instead of being top-level in the schema.I tried to debug the proc macro, but my knowledge of Rust macros is fairly lacking and I wasn't able to track down the point where the schema gets generated. If you could point me in the right direction I could open a PR to fix this.
Example
Rust
Example payload
Currently generated schema
Expected Schema
The text was updated successfully, but these errors were encountered: