mcrobbj
6 years agoOccasional Contributor
Examples in a component - Array of objects
I have a nested component that I want to have examples of
So
components: schema: myObject: type: object properties: authId: type: string myArray: type: array items: $ref: '#/components/schemas/myObject2' myObject2: type: object properties: filed1: type: string filed2: type: string
and an example like:
{ authId: "123", [ { field1: "One", filed2: "two"}, { field1: "three", filed2: "four"}, ] }
How do I do this?