Skip to content
Discussion options

You must be logged in to vote

@skoropadas

You can’t mix $ref and enum at the same level in OpenAPI 3.x (or JSON Schema draft-04/05/07, which OAS 3.x is based on).

The $ref keyword replaces the entire schema at that location.
You cannot add other siblings like enum, type, description, etc.

Example on how this should be done:

auditType:
  allOf:
    - $ref: '#/components/schemas/AuditEventType'
    - type: string
      enum: [OFFER]

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@skoropadas
Comment options

Answer selected by skoropadas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants