Skip to content

mbowman100/swagger-validator-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validate Swagger API Documentation

This action uses the swagger-cli to validate a given swagger file(s).

Inputs

files

Required The name of the file(s) to validate. Can be a single file path or a list of files.

See example for suggested command for finding all files ending in "openapi.yaml".

Outputs

example.openapi.yaml is valid

example.openapi.yaml is invalid

Example usage

uses: mbowman100/swagger-validator-action@v1
with:
  files:
    example.openapi.yaml

Example of usage from within a repo

on: push
name: Validate API swagger documentation
jobs:
  validate:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Get OpenAPI files
      run: |
        FILES="$(find . -iname "*openapi.yaml")"
        echo ::set-env name=FILE_LIST::$FILES
    - name: swagger-validator
      uses: mbowman100/swagger-validator-action@master
      with:
        files: ${{ env.FILE_LIST }}

About

Validate swagger API documentation

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •