Skip to content

Commit 2933fe9

Browse files
authored
Merge pull request #4912 from karenetheridge/ether/v3.2-example-examples-mutually-exclusive
2 parents 130f076 + dc5dad6 commit 2933fe9

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/schemas/validation/schema.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ $defs:
10891089
type: object
10901090
additionalProperties:
10911091
$ref: '#/$defs/example-or-reference'
1092+
not:
1093+
required:
1094+
- example
1095+
- examples
10921096

10931097
map-of-strings:
10941098
type: object
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
openapi: 3.2.0
2+
3+
# this example should fail, as example cannot be used together with examples.
4+
5+
info:
6+
title: API
7+
version: 1.0.0
8+
components:
9+
parameters:
10+
animal:
11+
name: animal
12+
in: header
13+
schema: {}
14+
example: bear
15+
examples:
16+
a mammalian example:
17+
dataValue: bear
18+
19+
20+

0 commit comments

Comments
 (0)