-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(resolver): collect errors in ReferenceElement visitor hook
This change is specific to OpenAPI 3.1.0 resolution strategy. Errors are now collected, instead of thrown and visitor traversal is not interrupted. Refs #2802
- Loading branch information
Showing
11 changed files
with
460 additions
and
202 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
13 changes: 13 additions & 0 deletions
13
...1-swagger-client/reference-object/__fixtures__/direct-external-circular/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,13 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"externalRef": { | ||
"$ref": "./root.json#/components/parameters/externalRef", | ||
"description": "another ref" | ||
} | ||
} | ||
} | ||
} | ||
] |
2 changes: 1 addition & 1 deletion
2
...openapi-3-1-swagger-client/reference-object/__fixtures__/direct-external-circular/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,5 +1,5 @@ | ||
{ | ||
"externalParameter": { | ||
"$ref": "./root.json#/components/parameters/userId" | ||
"$ref": "./root.json#/components/parameters/externalRef" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...1-swagger-client/reference-object/__fixtures__/direct-internal-circular/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,13 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"userId": { | ||
"$ref": "#/components/parameters/userId", | ||
"description": "description 1" | ||
} | ||
} | ||
} | ||
} | ||
] |
13 changes: 13 additions & 0 deletions
13
...swagger-client/reference-object/__fixtures__/indirect-external-circular/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,13 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"externalRef": { | ||
"$ref": "./root.json#/components/parameters/externalRef", | ||
"description": "another ref" | ||
} | ||
} | ||
} | ||
} | ||
] |
25 changes: 25 additions & 0 deletions
25
...swagger-client/reference-object/__fixtures__/indirect-internal-circular/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,25 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"parameters": { | ||
"userId": { | ||
"$ref": "#/components/parameters/userId", | ||
"description": "description 1" | ||
}, | ||
"indirection1": { | ||
"$ref": "#/components/parameters/userId", | ||
"description": "description 1" | ||
}, | ||
"indirection2": { | ||
"$ref": "#/components/parameters/userId", | ||
"description": "description 1" | ||
}, | ||
"indirection3": { | ||
"$ref": "#/components/parameters/userId", | ||
"description": "description 1" | ||
} | ||
} | ||
} | ||
} | ||
] |
Oops, something went wrong.