Forum Discussion
1 Reply
Sort By
- HKosova
Alumni
Hi Bernadete, check out the examples here:
How to have a property reference a model (i.e. nest the models)?
Basically, you define a separate schema for the nested object and then have a property $ref that schema, like so:
properties: user: # OAS 3 $ref: '#/components/schemas/User' # OAS 2 # $ref: '#/definitions/User'