Skip to content

Use @redocly/openapi-core to support encoded refs #761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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