OpenAPI 3 - Reuse of properties

Refresh

April 2019

Views

3 time

0

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?

0 answers