Following the example of an OpenAPI 3 definition:
components:
schemas:
Foo:
properties:
string:
type: string
enumField:
type: string
enum: ['VALUE_1', 'VALUE_2']
Bar:
properties:
enumField:
type: string
enum: ['VALUE_1', 'VALUE_2']
Is there a way to reuse enumField
or do I have to specify it every time I use it?
$ref
the enum schema in theenumField
property. See the ^^ linked question for the$ref
syntax. – Regularly