Forum Discussion
HKosova
Alumni
7 years agoHi PavZav,
Thanks for the report! The issue with oneOf/anyOf schema examples is tracked on GitHub here:
https://github.com/swagger-api/swagger-ui/issues/3803
You can subscribe to this issue to get notified when it's fixed.
As a workaround, you can specify an example for the "data" property yourself:
data:
oneOf:
- $ref: '#/components/schemas/obj1Item'
- $ref: '#/components/schemas/obj2Item'
discriminator:
...
example:
type: obj1
firstTypeStructure: 123