-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reference): add support for switching external resolution on/off
- Loading branch information
Showing
9 changed files
with
647 additions
and
231 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
5 changes: 5 additions & 0 deletions
5
...eference/test/resolve-strategies/openapi-3-1/fixtures/external-reference-depth-4/ex1.json
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,5 @@ | ||
{ | ||
"prop": { | ||
"$ref": "ex2.json" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...eference/test/resolve-strategies/openapi-3-1/fixtures/external-reference-depth-4/ex2.json
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,5 @@ | ||
{ | ||
"prop": { | ||
"$ref": "ex3.json" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...eference/test/resolve-strategies/openapi-3-1/fixtures/external-reference-depth-4/ex3.json
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,3 @@ | ||
{ | ||
"prop": "value" | ||
} |
74 changes: 74 additions & 0 deletions
74
...ference/test/resolve-strategies/openapi-3-1/fixtures/external-reference-depth-4/root.json
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,74 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"x-top-level": "value", | ||
"info": { | ||
"title": "Sample API", | ||
"description": "Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.", | ||
"summary": "example summary", | ||
"termsOfService": "Terms of service", | ||
"version": "0.1.9", | ||
"x-version": "0.1.9-beta", | ||
"license": { | ||
"name": "Apache License 2.0", | ||
"x-fullName": "Apache License 2.0", | ||
"identifier": "Apache License 2.0", | ||
"url": "https://www.apache.org/licenses/LICENSE-2.0" | ||
}, | ||
"contact": { | ||
"name": "Vladimir Gorej", | ||
"x-username": "char0n", | ||
"url": "https://www.linkedin.com/in/vladimirgorej/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/users": { | ||
"summary": "path item summary", | ||
"description": "path item description", | ||
"get": { | ||
"tags": ["tag1", "tag2"], | ||
"summary": "Returns a list of users.", | ||
"description": "Optional extended description in CommonMark or HTML.", | ||
"externalDocs": { | ||
"description": "Find more info here", | ||
"url": "https://example.com" | ||
}, | ||
"operationId": "getUserList", | ||
"parameters": [ | ||
{ | ||
"$ref": "ex1.json" | ||
} | ||
], | ||
"requestBody": { | ||
"content": {} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "A JSON array of user names", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"201": { | ||
"description": "A response" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "userId", | ||
"in": "query", | ||
"description": "ID of the user", | ||
"required": true | ||
} | ||
] | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...reference/test/resolve-strategies/openapi-3-1/fixtures/single-external-reference/ex1.json
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 @@ | ||
{} |
74 changes: 74 additions & 0 deletions
74
...eference/test/resolve-strategies/openapi-3-1/fixtures/single-external-reference/root.json
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,74 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"x-top-level": "value", | ||
"info": { | ||
"title": "Sample API", | ||
"description": "Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.", | ||
"summary": "example summary", | ||
"termsOfService": "Terms of service", | ||
"version": "0.1.9", | ||
"x-version": "0.1.9-beta", | ||
"license": { | ||
"name": "Apache License 2.0", | ||
"x-fullName": "Apache License 2.0", | ||
"identifier": "Apache License 2.0", | ||
"url": "https://www.apache.org/licenses/LICENSE-2.0" | ||
}, | ||
"contact": { | ||
"name": "Vladimir Gorej", | ||
"x-username": "char0n", | ||
"url": "https://www.linkedin.com/in/vladimirgorej/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/users": { | ||
"summary": "path item summary", | ||
"description": "path item description", | ||
"get": { | ||
"tags": ["tag1", "tag2"], | ||
"summary": "Returns a list of users.", | ||
"description": "Optional extended description in CommonMark or HTML.", | ||
"externalDocs": { | ||
"description": "Find more info here", | ||
"url": "https://example.com" | ||
}, | ||
"operationId": "getUserList", | ||
"parameters": [ | ||
{ | ||
"$ref": "ex1.json" | ||
} | ||
], | ||
"requestBody": { | ||
"content": {} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "A JSON array of user names", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"201": { | ||
"description": "A response" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "userId", | ||
"in": "query", | ||
"description": "ID of the user", | ||
"required": true | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.