Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
/ oas3-lint Public archive

GitHub Action for linting OpenAPI Specification 3 files

Notifications You must be signed in to change notification settings

semestry/oas3-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oas3-lint

GitHub Action for linting OpenAPI Specification 3 files using Spectral.

Usage

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - uses: eveoh/oas3-lint@v1
        with:
          spec: path/to/spec.yaml
          token: ${{ secrets.GITHUB_TOKEN }}

Options

spec (required)

The path to the specification file (OpenAPI Specification 3, YAML) that should be linted.

Example:

with:
  spec: path/to/spec.yaml

token (required)

The GitHub token that is used to create the Check Run using the GitHub Checks API. Should be set to the GITHUB_TOKEN secret that is automatically created by the GitHub Actions runner.

Example:

with:
  token: ${{ secrets.GITHUB_TOKEN }}

ruleset

Path to the ruleset file.

Example:

with:
  ruleset: path/to/.spectral.yaml