Coder Social home page Coder Social logo

afmancilla / spectral-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stoplightio/spectral-action

0.0 0.0 0.0 1.37 MB

GitHub Action wrapper for Spectral - a JSON/YAML/OpenAPI/AsyncAPI/etc linter with custom rule support.

Home Page: https://stoplight.io/open-source/spectral

License: Apache License 2.0

JavaScript 88.66% TypeScript 10.87% Dockerfile 0.47%

spectral-action's Introduction

Spectral Linter Action

This action uses Spectral from Stoplight to lint your OpenAPI documents, or any other JSON/YAML files.

23

Usage

See action.yml

name: Run Spectral on Pull Requests

on:
  - pull_request

jobs:
  build:
    name: Run Spectral
    runs-on: ubuntu-latest
    steps:
      # Check out the repository
      - uses: actions/checkout@v3

      # Run Spectral
      - uses: stoplightio/spectral-action@latest
        with:
          file_glob: 'doc/api/*.yaml'

Inputs

  • file_glob: Pattern describing the set of files to lint. Defaults to *.oas.{json,yml,yaml}. (Note: Pattern syntax is documented in the fast-glob package documentation)
  • spectral_ruleset: Custom ruleset to load in Spectral. When unspecified, will try to load the default .spectral.yaml ruleset if it exists.

Configuration

Spectral Action will respect your Spectral Rulesets, which can be defined, extended, and overriden by placing .spectral.yml in the root of your repository.

However, if you'd like to simply use a core ruleset without additional configuration, create a .spectral.yml in you repository's root with only the contents: extends: ["spectral:{rulesetTagHere}"]

spectral-action's People

Contributors

xvincentx avatar mnaumanali94 avatar dependabot-support avatar p0lip avatar nulltoken avatar dependabot-preview[bot] avatar dependabot[bot] avatar afmancilla avatar astagi avatar kaylachun avatar oncilla avatar bradlet avatar ayushkhandelwal317 avatar johnnylai avatar kanadgupta avatar ioggstream avatar hpatoio avatar tvcsantos avatar desislav-petrov avatar machisuke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.