-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(reference): fix regression in OpenAPI 2.0 derferencing (#3976)
Refs #3974
- Loading branch information
Showing
5 changed files
with
63 additions
and
37 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
18 changes: 9 additions & 9 deletions
18
...ereference/strategies/openapi-2/reference-object/fixtures/external-only/dereferenced.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
23 changes: 18 additions & 5 deletions
23
...nce/test/dereference/strategies/openapi-2/reference-object/fixtures/external-only/ex.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 |
---|---|---|
@@ -1,8 +1,21 @@ | ||
{ | ||
"externalParameter": { | ||
"name": "externalParameter", | ||
"in": "query", | ||
"description": "this is parameter stored in external file", | ||
"required": true | ||
"openapi": "2.0", | ||
"definitions": { | ||
"schema1": { | ||
"$ref": "#/definitions/somePayload" | ||
}, | ||
"somePayload": { | ||
"type": "object", | ||
"properties": { | ||
"sentAt": { | ||
"$ref": "#/definitions/sentAt" | ||
} | ||
} | ||
}, | ||
"sentAt": { | ||
"type": "string", | ||
"format": "date-time", | ||
"description": "Date and time when the message was sent." | ||
} | ||
} | ||
} |
10 changes: 3 additions & 7 deletions
10
...e/test/dereference/strategies/openapi-2/reference-object/fixtures/external-only/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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
{ | ||
"swagger": "2.0", | ||
"paths": { | ||
"/": { | ||
"parameters": [ | ||
{ | ||
"$ref": "./ex.json#/externalParameter" | ||
} | ||
] | ||
"definitions": { | ||
"externalSchema": { | ||
"$ref": "./ex.json#/definitions/schema1" | ||
} | ||
} | ||
} |