Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Swagger Editor Validator

Actions
This GitHub Actions validates OpenAPI (OAS) definition file using Swagger Editor
v1.5.1
Latest
Star (55)

Swagger Editor Validate Github Action

This GitHub Action validates OpenAPI (OAS) definition file usingSwagger Editor.

test

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.

image

If you're interested about technical design and evolution of this GitHub Action pleaseread ourrelease article.

Inputs

swagger-editor-url

Optional Defines URL ofswagger-editor where definitionfile is going to be validated. Defaulthttps://editor.swagger.io/.

definition-file

Required Defines path ofOAS definition file that existsas a physical file in your repository.

ignore-error

Optional Defines path to JavaScript file containing predicate for determining if the error should be ignored or not.

default-timeout

Optional Defines maximum time in milliseconds a script waits for certain actions or events to occur.

Example usage

There are two major use-cases of how to use this GitHub Action.

Public use-case

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

Private use-case

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

This GitHub Actions validates OpenAPI (OAS) definition file using Swagger Editor
v1.5.1
Latest

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.


[8]ページ先頭

©2009-2025 Movatter.jp