Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve error source detection (#685)
* fix: consume graph data in doesBelongToSourceDoc * fix: write detection from scratch * refactor: flatten parsedMap structure * fix: normalize source * chore: bump @stoplight/json and use utils * build: rollup config
- Loading branch information
Showing
17 changed files
with
492 additions
and
133 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
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,44 @@ | ||
%YAML 1.2 | ||
--- | ||
openapi: 3.0.0 | ||
|
||
info: | ||
title: Hey Mum! I'm on GitHub! | ||
description: Resource definition. | ||
version: 1.0.0 | ||
|
||
servers: | ||
- url: https://boom.com | ||
|
||
paths: | ||
"/test": | ||
get: | ||
summary: Dummy endpoint. | ||
description: Cf. summary | ||
responses: | ||
"200": | ||
description: All is good. | ||
content: | ||
application/json: | ||
schema: | ||
type: string | ||
"400": | ||
description: Bad Request. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/Error" | ||
"500": | ||
description: No Bueno. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "./lib.yaml#/components/schemas/Error" | ||
components: | ||
schemas: | ||
Error: | ||
$ref: "#/components/schemas/Baz" | ||
Baz: | ||
$ref: ./lib.yaml#/components/schemas/Error | ||
Foo: | ||
type: string |
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,24 @@ | ||
%YAML 1.2 | ||
--- | ||
openapi: 3.0.0 | ||
|
||
info: | ||
title: Library | ||
description: Collection of reusable standard definitions. | ||
version: 2.0.0 | ||
paths: {} | ||
components: | ||
schemas: | ||
Error: | ||
type: object | ||
properties: | ||
error: | ||
type: string | ||
maxLength: 1 | ||
error_description: | ||
type: string | ||
maxLength: 1 | ||
status_code: | ||
type: string | ||
test: | ||
$ref: ./URIError.yaml#/components/schemas/Foo |
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
Oops, something went wrong.