Skip to content

OAS3 & Swagger2 Lint Action

Actions
Runs Stoplight Spectral lint on your OAS file. Supports Swagger 2.0 or OpenAPI 3.0 format
v1.0
Latest
Star (0)

OAS 3.0 & Swagger 2.0 Lint Action

GitHub Action for validating OAS 3.0 or Swagger 2.0 JSON or YAML files using Stoplight Spectral

CI


Input

file_path: Argument references path of spec file on workspace. (Optional)

In case of absecence, the file named openapi-spec.yml is used by default


Example

You may copy & paste yaml below into your repo under path .github/workflows/oas-spec-lint.yml

name: OAS Linting Action
on:
  push:
    branches: [main]
jobs:
  linting:
    name: Linting
    runs-on: ubuntu-latest
    steps:
      # This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
      - name: Check out repository
        uses: actions/checkout@v2
    
      # Runs 'spectral lint'
      - name: Run spectral lint
        uses: ahmetgeymen/spectral-lint-action@v1.0
        with:
          file_path: openapi-spec.yml

OAS3 & Swagger2 Lint Action 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

Runs Stoplight Spectral lint on your OAS file. Supports Swagger 2.0 or OpenAPI 3.0 format
v1.0
Latest

OAS3 & Swagger2 Lint Action 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.