Swagger Editor Validator
ActionsTags
(2)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
Swagger Editor Validator is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.
About
Tags
(2)Swagger Editor Validator is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

