This repository creates a container image swagger-validate
that has the swagget validator in-built.
This is to be used in CI runners to validate the openapi spec yaml files or json files for the specified directory.
To use in GitHub Actions,
name: swagger-validate
on:
push:
branches: [ master ]
jobs:
build:
container: jaymlaws/swagger-validate:latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: validate
run: validate .
This container image uses the swagger-cli to validate the yaml files.