Skip to content

Commit 86c48aa

Browse files
committed
Add test case that uses $ref and unevaluatedProperties
1 parent d6e8589 commit 86c48aa

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
- description: Modeling inheritance with JSON Schema $ref and unevaluatedProperties
2+
oad:
3+
openapi: 3.1.0
4+
paths:
5+
"/":
6+
get:
7+
responses:
8+
'200':
9+
content:
10+
application/json:
11+
schema:
12+
$ref: '#/components/schemas/fish'
13+
components:
14+
schemas:
15+
withEyes:
16+
properties:
17+
numberOfEyes:
18+
type: integer
19+
fish:
20+
$ref: '#/components/schemas/withEyes'
21+
type: object
22+
properties:
23+
name:
24+
type: string
25+
unevaluatedProperties: false
26+
valid_response:
27+
content_type: application/json
28+
body: { "name": "Moritz", numberOfEyes: 2 }
29+
invalid_response:
30+
content_type: application/json
31+
body: { "name": "Moritz", numberOfEyes: 2, foo: 'bar' }

0 commit comments

Comments
 (0)