-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add handling of absolute url path in ignore-file (#1014)
- Loading branch information
Showing
5 changed files
with
208 additions
and
10 deletions.
There are no files selected for viewing
144 changes: 144 additions & 0 deletions
144
packages/core/src/config/__tests__/__snapshots__/config.test.ts.snap
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,144 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`generation ignore object should generate config with absoluteUri for ignore 1`] = ` | ||
StyleguideConfig { | ||
"_usedRules": Set {}, | ||
"_usedVersions": Set {}, | ||
"configFile": undefined, | ||
"decorators": Object { | ||
"oas2": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
"oas3_0": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
"oas3_1": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
}, | ||
"doNotResolveExamples": false, | ||
"extendPaths": Array [], | ||
"ignore": Object { | ||
"https://some-path.yaml": Object { | ||
"no-unused-components": Set { | ||
"#/components/schemas/Foo", | ||
}, | ||
}, | ||
"some-path/openapi.yaml": Object { | ||
"no-unused-components": Set { | ||
"#/components/schemas/Foo", | ||
}, | ||
}, | ||
}, | ||
"pluginPaths": Array [], | ||
"plugins": Array [], | ||
"preprocessors": Object { | ||
"oas2": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
"oas3_0": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
"oas3_1": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
}, | ||
"rawConfig": Object { | ||
"_usedRules": Set {}, | ||
"_usedVersions": Set {}, | ||
"configFile": "redocly.yaml", | ||
"decorators": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
"doNotResolveExamples": false, | ||
"ignore": Object {}, | ||
"plugins": Array [], | ||
"preprocessors": Object { | ||
"oas2": Object {}, | ||
"oas3_0": Object {}, | ||
"oas3_1": Object {}, | ||
}, | ||
"rawConfig": Object { | ||
"plugins": Array [], | ||
"rules": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
}, | ||
"recommendedFallback": false, | ||
"rules": Object { | ||
"oas2": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_0": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_1": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
}, | ||
}, | ||
"recommendedFallback": false, | ||
"rules": Object { | ||
"oas2": Object { | ||
"oas2": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_0": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_1": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
}, | ||
"oas3_0": Object { | ||
"oas2": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_0": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_1": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
}, | ||
"oas3_1": Object { | ||
"oas2": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_0": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
"oas3_1": Object { | ||
"no-empty-servers": "error", | ||
"operation-summary": "error", | ||
}, | ||
}, | ||
}, | ||
} | ||
`; |
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,8 @@ | ||
export const ignoredFileStub = { | ||
'openapi.yaml': { | ||
'no-unused-components': ['#/components/schemas/Foo'], | ||
}, | ||
'https://some-path.yaml': { | ||
'no-unused-components': ['#/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
28e7e83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Test suite run success
566 tests passing in 85 suites.
Report generated by 🧪jest coverage report action from 28e7e83