0

I did not find the solution in the documentation, this is my yaml object:

type: object
properties:
attrKey:
   $ref: '../schemas/MyEnum.yaml'
required:
 - attrKey

MyEnum.yaml:

type: string
enum:
  - A
  - B
  - C
  - D

How to make for example only C value from enum as not required but use only this one enum, please?

Marek Bernád
  • 481
  • 2
  • 8
  • 28
  • 1
    Does this answer your question? -- [Reusing a subset of an enum in OpenAPI](https://stackoverflow.com/q/57507396/113116) – Helen Jun 13 '23 at 07:11
  • It is an interesting solution, but not answering a question, as I asked to not use 2 enums but one. It seems it is not possible to do it in swagger for now... – Marek Bernád Jun 13 '23 at 08:28

0 Answers0