-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github action to lint with redocly
- Loading branch information
1 parent
4717967
commit ba2a4e2
Showing
2 changed files
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- release-** | ||
- document-process-to-generate-the-oas | ||
|
||
jobs: | ||
test_swagger_editor_validator_remote: | ||
runs-on: redocly/cli | ||
name: Validate the swagger with redocly | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Validate OpenAPI definition with redocly |
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,55 @@ | ||
rules: | ||
#Special rules | ||
no-unresolved-refs: error | ||
no-unused-components: warn | ||
security-defined: error | ||
spec: error | ||
spec-components-invalid-map-name: error #All the fixed fields declared below are objects that MUST use keys that match the regular expression | ||
spec-strict-refs: error | ||
#info | ||
info-contact: warn | ||
info-license: warn | ||
info-license-url: warn | ||
#Operations | ||
operation-operationId: error | ||
operation-operationId-unique: error | ||
operation-operationId-url-safe: error | ||
operation-summary: error | ||
operation-2xx-response: error | ||
operation-4xx-response: error | ||
operation-description: error | ||
#Parameters | ||
no-invalid-parameter-examples: | ||
severity: error | ||
allowAdditionalProperties: false | ||
operation-parameters-unique: error | ||
parameter-description: error #uncomment this | ||
path-declaration-must-exist: error | ||
path-parameters-defined: error | ||
#path rules | ||
no-ambiguous-paths: error | ||
no-http-verbs-in-paths: | ||
severity: warn | ||
splitIntoWords: true | ||
no-identical-paths: error | ||
no-path-trailing-slash: error | ||
|
||
#Requests, Responses, and Schemas rules | ||
no-enum-type-mismatch: error | ||
no-example-value-and-externalValue: error | ||
no-invalid-media-type-examples: | ||
severity: error | ||
allowAdditionalProperties: false | ||
scalar-property-missing-example: | ||
severity: warn | ||
no-invalid-schema-examples: | ||
severity: error | ||
allowAdditionalProperties: false | ||
#Server rules | ||
no-empty-servers: error | ||
no-server-trailing-slash: error | ||
no-undefined-server-variable: error | ||
#Tags rules | ||
operation-singular-tag: error | ||
operation-tag-defined: error | ||
|