-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(resolve): fix critial bug in OpenAPI 3.1.0 resolution (#3050)
This bug was further upstream also in ApiDOM, which was unable to resolve local references from fragments as well. Refs swagger-api/apidom#2934
- Loading branch information
Showing
11 changed files
with
420 additions
and
183 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
45 changes: 45 additions & 0 deletions
45
...swagger-client/schema-object/__fixtures__/$anchor-internal-no-embedding/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,45 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"$id": "/components/schemas/user", | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$id": "/components/schemas/user-profile", | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"UserProfile": { | ||
"$id": "/components/schemas/user-profile", | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
34 changes: 34 additions & 0 deletions
34
...api-3-1-swagger-client/schema-object/__fixtures__/$anchor-internal-no-embedding/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,34 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"$id": "/components/schemas/user", | ||
"type": "object", | ||
"properties": { | ||
"login": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"profile": { | ||
"$ref": "/components/schemas/user-profile#user-profile" | ||
} | ||
} | ||
}, | ||
"UserProfile": { | ||
"$id": "/components/schemas/user-profile", | ||
"$anchor": "user-profile", | ||
"properties": { | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...pi-3-1-swagger-client/schema-object/__fixtures__/$ref-url-path-override/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,21 @@ | ||
[ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object" | ||
}, | ||
"UserProfile": { | ||
"$id": "/components/schemas/user-profile", | ||
"type": "object", | ||
"properties": { | ||
"user": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
19 changes: 19 additions & 0 deletions
19
...es/openapi-3-1-swagger-client/schema-object/__fixtures__/$ref-url-path-override/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,19 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"components": { | ||
"schemas": { | ||
"User": { | ||
"type": "object" | ||
}, | ||
"UserProfile": { | ||
"$id": "/components/schemas/user-profile", | ||
"type": "object", | ||
"properties": { | ||
"user": { | ||
"$ref": "/#/components/schemas/User" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.