-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(resolver): add tests for OpenAPI 3.1.0 allowMetaPatches option
Closes #2760
- Loading branch information
Showing
34 changed files
with
1,425 additions
and
47 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
32 changes: 32 additions & 0 deletions
32
...swagger-client/schema-object/__fixtures__/$anchor-external-meta-patches/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,32 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$$ref": "/home/smartbear/ex.json#user-profile", | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
15 changes: 15 additions & 0 deletions
15
...enapi-3-1-swagger-client/schema-object/__fixtures__/$anchor-external-meta-patches/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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$defs": { | ||
"UserProfile": { | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...api-3-1-swagger-client/schema-object/__fixtures__/$anchor-external-meta-patches/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,21 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$ref": "./ex.json#user-profile" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...swagger-client/schema-object/__fixtures__/$anchor-internal-meta-patches/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,43 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$$ref": "/home/smartbear/root.json#user-profile", | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"UserProfile": { | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
32 changes: 32 additions & 0 deletions
32
...api-3-1-swagger-client/schema-object/__fixtures__/$anchor-internal-meta-patches/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,32 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$ref": "#user-profile" | ||
} | ||
} | ||
}, | ||
"UserProfile": { | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...1-swagger-client/schema-object/__fixtures__/$id-uri-direct-meta-patches/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,30 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$$ref": "/home/smartbear/nested/ex.json", | ||
"$id": "./nested/", | ||
"type": "object", | ||
"properties": { | ||
"avatar": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
...-3-1-swagger-client/schema-object/__fixtures__/$id-uri-direct-meta-patches/nested/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"avatar": { | ||
"type": "string" | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...enapi-3-1-swagger-client/schema-object/__fixtures__/$id-uri-direct-meta-patches/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,22 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$id": "./nested/", | ||
"$ref": "./ex.json" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...wagger-client/schema-object/__fixtures__/$id-uri-enclosing-meta-patches/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,30 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"$id": "./nested/", | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$$ref": "/home/smartbear/nested/ex.json", | ||
"type": "object", | ||
"properties": { | ||
"avatar": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
...1-swagger-client/schema-object/__fixtures__/$id-uri-enclosing-meta-patches/nested/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"avatar": { | ||
"type": "string" | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...pi-3-1-swagger-client/schema-object/__fixtures__/$id-uri-enclosing-meta-patches/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,22 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"$id": "./nested/", | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$ref": "./ex.json" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.