-
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 allowMetaPatches option (#2337)
This affects OpenAPI 3.1 swagger-client dereference strategy. Refs #2336
- Loading branch information
Showing
26 changed files
with
460 additions
and
3 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
14 changes: 14 additions & 0 deletions
14
...napi-3-1-swagger-client/path-item-object/fixtures/meta-patches-external/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"pathItems": { | ||
"externalRef": { | ||
"description": "external ref", | ||
"get": {}, | ||
"$$ref": "http://localhost:8123/ex3.json#/externalPathItem" | ||
} | ||
} | ||
} | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
...egies/openapi-3-1-swagger-client/path-item-object/fixtures/meta-patches-external/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 @@ | ||
{ | ||
"indirection": { | ||
"$ref": "./ex2.json#/indirection" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...egies/openapi-3-1-swagger-client/path-item-object/fixtures/meta-patches-external/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 @@ | ||
{ | ||
"indirection": { | ||
"$ref": "./ex3.json#/externalPathItem" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...egies/openapi-3-1-swagger-client/path-item-object/fixtures/meta-patches-external/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,6 @@ | ||
{ | ||
"externalPathItem": { | ||
"description": "this is path item stored in external file", | ||
"get": {} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...gies/openapi-3-1-swagger-client/path-item-object/fixtures/meta-patches-external/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,11 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"pathItems": { | ||
"externalRef": { | ||
"$ref": "./ex1.json#/indirection", | ||
"description": "external ref" | ||
} | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...napi-3-1-swagger-client/path-item-object/fixtures/meta-patches-internal/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"pathItems": { | ||
"pathItem1": { | ||
"summary": "path item summary", | ||
"description": "path item description", | ||
"$$ref": "http://localhost:8123/root.json#/components/pathItems/pathItem3" | ||
}, | ||
"pathItem2": { | ||
"summary": "path item summary", | ||
"description": "path item description", | ||
"$$ref": "http://localhost:8123/root.json#/components/pathItems/pathItem3" | ||
}, | ||
"pathItem3": { | ||
"summary": "path item summary", | ||
"description": "path item description" | ||
} | ||
} | ||
} | ||
} | ||
] |
17 changes: 17 additions & 0 deletions
17
...gies/openapi-3-1-swagger-client/path-item-object/fixtures/meta-patches-internal/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,17 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"pathItems": { | ||
"pathItem1": { | ||
"$ref": "#/components/pathItems/pathItem2" | ||
}, | ||
"pathItem2": { | ||
"$ref": "#/components/pathItems/pathItem3" | ||
}, | ||
"pathItem3": { | ||
"summary": "path item summary", | ||
"description": "path item description" | ||
} | ||
} | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
...napi-3-1-swagger-client/reference-object/fixtures/meta-patches-external/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"externalRef": { | ||
"name": "externalParameter", | ||
"in": "query", | ||
"description": "external ref", | ||
"required": true, | ||
"$$ref": "http://localhost:8123/ex3.json#/externalParameter" | ||
} | ||
} | ||
} | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
...egies/openapi-3-1-swagger-client/reference-object/fixtures/meta-patches-external/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 @@ | ||
{ | ||
"indirection": { | ||
"$ref": "./ex2.json#/indirection" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...egies/openapi-3-1-swagger-client/reference-object/fixtures/meta-patches-external/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 @@ | ||
{ | ||
"indirection": { | ||
"$ref": "./ex3.json#/externalParameter" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...egies/openapi-3-1-swagger-client/reference-object/fixtures/meta-patches-external/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,8 @@ | ||
{ | ||
"externalParameter": { | ||
"name": "externalParameter", | ||
"in": "query", | ||
"description": "this is parameter stored in external file", | ||
"required": true | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...gies/openapi-3-1-swagger-client/reference-object/fixtures/meta-patches-external/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,11 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"externalRef": { | ||
"$ref": "./ex1.json#/indirection", | ||
"description": "external ref" | ||
} | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...napi-3-1-swagger-client/reference-object/fixtures/meta-patches-internal/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"param1": { | ||
"name": "offset", | ||
"in": "query", | ||
"required": true, | ||
"$$ref": "http://localhost:8123/root.json#/components/parameters/param3" | ||
}, | ||
"param2": { | ||
"name": "offset", | ||
"in": "query", | ||
"required": true, | ||
"$$ref": "http://localhost:8123/root.json#/components/parameters/param3" | ||
}, | ||
"param3": { | ||
"name": "offset", | ||
"in": "query", | ||
"required": true | ||
} | ||
} | ||
} | ||
} | ||
|
||
] |
18 changes: 18 additions & 0 deletions
18
...gies/openapi-3-1-swagger-client/reference-object/fixtures/meta-patches-internal/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,18 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"param1": { | ||
"$ref": "#/components/parameters/param2" | ||
}, | ||
"param2": { | ||
"$ref": "#/components/parameters/param3" | ||
}, | ||
"param3": { | ||
"name": "offset", | ||
"in": "query", | ||
"required": true | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.