Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/schemas/validation/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,10 @@ $defs:
type: object
additionalProperties:
$ref: '#/$defs/example-or-reference'
not:
required:
- example
- examples

map-of-strings:
type: object
Expand Down
20 changes: 20 additions & 0 deletions tests/schema/fail/example-examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
openapi: 3.1.1

# this example should fail, as example cannot be used together with examples.

info:
title: API
version: 1.0.0
components:
parameters:
animal:
name: animal
in: header
schema: {}
example: bear
examples:
a mammalian example:
value: bear