-
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.
- Loading branch information
Showing
12 changed files
with
105 additions
and
37 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
5 changes: 5 additions & 0 deletions
5
__tests__/lint/assertions-property-key-not-allowed/openapi.yaml
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,5 @@ | ||
openapi: 3.1.0 | ||
components: | ||
schemas: | ||
Test: | ||
type: string |
12 changes: 12 additions & 0 deletions
12
__tests__/lint/assertions-property-key-not-allowed/redocly.yaml
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,12 @@ | ||
apis: | ||
main: | ||
root: ./openapi.yaml | ||
|
||
rules: | ||
rule/not-allowed-property: | ||
subject: | ||
type: Schema | ||
property: type # this is not allowed with the `disallowed` assertion | ||
assertions: | ||
disallowed: | ||
- string |
11 changes: 11 additions & 0 deletions
11
__tests__/lint/assertions-property-key-not-allowed/snapshot.js
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 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`E2E lint assertions-property-key-not-allowed 1`] = ` | ||
validating /openapi.yaml... | ||
Something went wrong when processing ./__tests__/lint/assertions-property-key-not-allowed/openapi.yaml: | ||
- The 'disallowed' assertion can't be used on properties. Please remove the 'property' key. | ||
`; |
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,5 @@ | ||
openapi: 3.1.0 | ||
components: | ||
schemas: | ||
Test: | ||
type: string |
11 changes: 11 additions & 0 deletions
11
__tests__/lint/assertions-property-key-required/redocly.yaml
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: | ||
rule/required-property: | ||
subject: | ||
type: Schema | ||
# Missing the 'property' key | ||
assertions: | ||
nonEmpty: true |
11 changes: 11 additions & 0 deletions
11
__tests__/lint/assertions-property-key-required/snapshot.js
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 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`E2E lint assertions-property-key-required 1`] = ` | ||
validating /openapi.yaml... | ||
Something went wrong when processing ./__tests__/lint/assertions-property-key-required/openapi.yaml: | ||
- The 'nonEmpty' assertion can't be used on all keys. Please provide a single property. | ||
`; |
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.
27ec10a
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
734 tests passing in 102 suites.
Report generated by 🧪jest coverage report action from 27ec10a