Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork15
This GitHub Actions validates OpenAPI (OAS) definition file using Swagger Editor.
License
swaggerexpert/swagger-editor-validate
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This GitHub Action validates OpenAPI (OAS) definition file usingSwagger Editor.
It's handy for use-cases when OAS definition is maintained manually and is checked within the git.If modifications are made to the OAS definition you want to make sure that there are no errorsintroduced by modifications. Errors that would appear in Swagger Editor when the OAS definitionwould be pasted inside it.
If you're interested about technical design and evolution of this GitHub Action pleaseread ourrelease article.
Optional Defines URL ofswagger-editor where definitionfile is going to be validated. Defaulthttps://editor.swagger.io/.
Required Defines path ofOAS definition file that existsas a physical file in your repository.
Optional Defines path to JavaScript file containing predicate for determining if the error should be ignored or not.
Optional Defines maximum time in milliseconds a script waits for certain actions or events to occur.
There are two major use-cases of how to use this GitHub Action.
If you have access to the internet and don't mind that this action sends your OAS definitiontohttps://editor.swagger.io/ for validation.
on:[push]jobs:test_swagger_editor_validator_remote:runs-on:ubuntu-latestname:Swagger Editor Validator Remotesteps: -uses:actions/checkout@v4 -name:Validate OpenAPI definitionuses:swaggerexpert/swagger-editor-validate@v1with:definition-file:examples/openapi-2-0.yaml
If you want to maintain complete privacy and your OAS definition may containsensitive information use the following workflow. The workflow uses swagger-editordocker image that runs as service of the workflow.
on:[push]jobs:test_swagger_editor_validator_service:runs-on:ubuntu-latestname:Swagger Editor Validator Service# Service containers to run with `runner-job`services:# Label used to access the service containerswagger-editor:# Docker Hub imageimage:swaggerapi/swagger-editorports:# Maps port 8080 on service container to the host 80 -80:8080steps: -uses:actions/checkout@v4 -name:Validate OpenAPI definitionuses:swaggerexpert/swagger-editor-validate@v1with:swagger-editor-url:http://localhost/definition-file:examples/openapi-2-0.yamldefault-timeout:20000
About
This GitHub Actions validates OpenAPI (OAS) definition file using Swagger Editor.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.

