This GitHub Action validates OpenAPI 2.0, OpenAPI 3.x.y and AsyncAPI 2.x definition file using ApiDOM Language Service.
Validation rules are exactly the same as the one that https://editor-next.swagger.io/ uses.
Supported specifications:
- OpenAPI 2.0
- OpenAPI 3.0.0
- OpenAPI 3.0.1
- OpenAPI 3.0.2
- OpenAPI 3.0.3
- OpenAPI 3.1.0
- AsyncAPI 2.0.0
- AsyncAPI 2.1.0
- AsyncAPI 2.2.0
- AsyncAPI 2.3.0
- AsyncAPI 2.4.0
- AsyncAPI 2.5.0
- AsyncAPI 2.6.0
Required Path to definition file.
Severity level at which to fail action. Default 1
, if not specified.
1
: Fails if error messages exist in validation output2
: Fails if error or warning messages exist in validation output3
: Fails if error, warning or information messages exist in validation output4
: Fails if error, warning, information or hint messages exist in validation output
uses: char0n/apidom-validate@v1
with:
definition-file: 'path/to/my/openapi.yaml'
fails-on: 2