Skip to content
Open
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
29 changes: 27 additions & 2 deletions __tests__/resources/example-pet-api.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,20 @@
"description": "Pet object corresponding to id"
},
"404": {
"description": "Pet not found"
"description": "Pet not found",
"content": {
"application/json": {
"schema": {
"type": "string"
},
"examples": {
"fourOhFour": {
"summary": "Example 404 response",
"value": "Four Oh Four"
}
}
}
}
}
},
"parameters": [
Expand All @@ -103,7 +116,19 @@
"description": "Pet replaced succesfully"
},
"404": {
"description": "Pet not found"
"description": "Pet not found",
"content": {
"application/json": {
"schema": {
"type": "string"
},
"examples": {
"fourOhFour": {
"$ref": "#/paths/~1pets~1%7Bid%7D~1get/responses/404/content/application~1json/examples/fourOhFour"
}
}
}
}
}
},
"parameters": [
Expand Down
17 changes: 17 additions & 0 deletions __tests__/resources/example-pet-api.openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ paths:
description: Pet object corresponding to id
'404':
description: Pet not found
content:
application/json:
schema:
type: string
examples:
fourOhFour:
summary: Example 404 response
value: Four Oh Four

parameters:
- name: id
in: path
Expand All @@ -72,6 +81,14 @@ paths:
description: Pet replaced succesfully
'404':
description: Pet not found
content:
application/json:
schema:
type: string
examples:
fourOhFour:
"$ref": "#/paths/~1pets~1%7Bid%7D~1get/responses/404/content/application~1json/examples/fourOhFour"

parameters:
- name: id
in: path
Expand Down
Loading