I am trying to add a read-only field for \'House\' in this example. The house is another model that I want to be read-only.
In this example, the array of Dogs can b
In OAS 3.1, schema definitions will support sibling keywords alongside $ref
:
House:
$ref: '#/components/schemas/House'
readOnly: true
Sibling keywords alongside $ref
are ignored. The workaround is to use allOf
to combine a $ref
with other attributes:
House:
readOnly: true
allOf:
- $ref: '#/definitions/House'