support nullable check for OAS 3.1 (#15698)

This commit is contained in:
karzang
2023-06-05 13:34:51 +02:00
committed by GitHub
parent d2446013d1
commit bc7bdca87f
35 changed files with 191 additions and 178 deletions

View File

@@ -1973,8 +1973,8 @@ components:
type: string
fruitReq:
additionalProperties: false
nullable: true
oneOf:
- type: "null"
- $ref: '#/components/schemas/appleReq'
- $ref: '#/components/schemas/bananaReq'
appleReq:
@@ -2023,8 +2023,8 @@ components:
in OAS schema >= 3.1.
discriminator:
propertyName: shapeType
nullable: true
oneOf:
- type: "null"
- $ref: '#/components/schemas/Triangle'
- $ref: '#/components/schemas/Quadrilateral'
NullableShape: