Skip to content

Commit d287f99

Browse files
committed
Cover discriminator with schema test cases
Also make the discriminator usage valid.
1 parent cbc870f commit d287f99

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/schema/pass/mega.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ components:
1919
securitySchemes:
2020
mtls:
2121
type: mutualTLS
22+
schemas:
23+
Foo:
24+
type: object
25+
properties:
26+
type:
27+
const: foo
2228
pathItems:
2329
myPathItem:
2430
post:
@@ -47,5 +53,9 @@ components:
4753
type: ['string','null']
4854
discriminator:
4955
propertyName: type
56+
mapping:
57+
foo: Foo
5058
x-extension: true
59+
anyOf:
60+
- $ref: "#/components/schemas/Foo"
5161
myArbitraryKeyword: true

0 commit comments

Comments
 (0)