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
_Note: you optionally could provide `discriminator.propertyName: "type"` on `Pet` ([docs](https://spec.openapis.org/oas/v3.1.0#discriminator-object)) to automatically generate the `type` key, but is less explicit._
522
522
523
523
While the schema permits you to use composition in any way you like, it’s good to always take a look at the generated types and see if there’s a simpler way to express your unions & intersections. Limiting the use of `oneOf` is not the only way to do that, but often yields the greatest benefits.
524
+
525
+
### Enum with custom names and descriptions
526
+
527
+
`x-enum-varnames`can be used to have another enum name for the corresponding value. This is used to define names of the enum items.
528
+
529
+
`x-enum-descriptions`can be used to provide an individual description for each value. This is used for comments in the code (like javadoc if the target language is java).
530
+
531
+
`x-enum-descriptions` and `x-enum-varnames` are each expected to be list of items containing the same number of items as enum. The order of the items in the list matters: their position is used to group them together.
0 commit comments