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
Yes this looks like Schemars need to fix this. If something needs fixing here, let me know or reopen this issue.
I'll close the issue here as this will be fixed in GREsau/schemars#39.
With the default settings, unions are rendered using the 'anyOf' relation, which is fine:
But when you want to use the OpenAPI generator to generate client code, the enum declaration needs (at least >= openapi-generator v5.0.0) a 'discriminator' property: https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/
This seems to correlate with serde's
#[serde(tag = "type")]
serialization option for enums.Edit: seems to be more related to Schemars. Pre-existing issue: GREsau/schemars#39
The text was updated successfully, but these errors were encountered: