-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cover linting issue with not linting depening on other problem…
…s and added basic tests
- Loading branch information
Showing
24 changed files
with
236 additions
and
83 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,11 @@ | ||
apis: | ||
main: | ||
root: ./openapi.yaml | ||
rules: | ||
$ref: rules.yaml | ||
|
||
non-existing-root-property: Fail | ||
|
||
theme: | ||
openapi: | ||
$ref: ./theme-openapi.yaml#/theme |
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,2 @@ | ||
info-contact: error | ||
wrong-rule: warn |
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,52 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`E2E lint-config test with option: { dirName: 'config-with-refs', option: 'warn' } 1`] = ` | ||
[1] .redocly.yaml:7:1 at #/non-existing-root-property | ||
Property \`non-existing-root-property\` is not expected here. | ||
5 | $ref: rules.yaml | ||
6 | | ||
7 | non-existing-root-property: Fail | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
8 | | ||
9 | theme: | ||
Warning was generated by the configuration spec rule. | ||
[2] theme-openapi.yaml:3:5 at #/theme/logo | ||
Expected type \`string\` but got \`object\`. | ||
1 | theme: | ||
2 | logo: | ||
3 | maxWidth: 100 # Fail - should be a string | ||
| ^^^^^^^^^^^^^ | ||
4 | | ||
referenced from .redocly.yaml:11:5 at #/theme/openapi | ||
Warning was generated by the configuration spec rule. | ||
[3] rules.yaml:2:1 at #/wrong-rule | ||
Property \`wrong-rule\` is not expected here. | ||
1 | info-contact: error | ||
2 | wrong-rule: warn | ||
| ^^^^^^^^^^ | ||
3 | | ||
referenced from .redocly.yaml:5:7 at #/apis/main/rules | ||
Warning was generated by the configuration spec rule. | ||
⚠️ Your config has 3 warnings. | ||
⚠️ No rules were configured. Learn how to configure rules: https://redocly.com/docs/cli/rules/ | ||
`; |
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,3 @@ | ||
theme: | ||
logo: | ||
maxWidth: 100 # Fail - should be a 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
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
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
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.