-
-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openapi3: fix ref internalization (#832)
- Loading branch information
1 parent
8c08c70
commit 14c8565
Showing
5 changed files
with
87 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
get: | ||
responses: | ||
"200": | ||
description: OK |
24 changes: 24 additions & 0 deletions
24
openapi3/testdata/issue831/testref.internalizepath.openapi.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
openapi: "3.0.3" | ||
info: | ||
title: Recursive refs example | ||
version: "1.0" | ||
paths: | ||
/bar: | ||
$ref: ./path.yml | ||
/foo: | ||
post: | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/requestBodies/test/content/application~1json/schema" | ||
responses: | ||
'200': | ||
description: Expected response to a valid request | ||
components: | ||
requestBodies: | ||
test: | ||
content: | ||
application/json: | ||
schema: | ||
type: string |
49 changes: 49 additions & 0 deletions
49
openapi3/testdata/issue831/testref.internalizepath.openapi.yml.internalized.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Recursive refs example", | ||
"version": "1.0" | ||
}, | ||
"paths": { | ||
"/bar": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/foo": { | ||
"post": { | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/requestBodies/test/content/application~1json/schema" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Expected response to a valid request" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"requestBodies": { | ||
"test": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |