DEV Community

Cover image for OpenAPI Review Action
Blake Mealey
Blake Mealey

Posted on • Edited on

OpenAPI Review Action

My Workflow

on: [pull_request]

jobs:
  review_openapi_specs:
    runs-on: ubuntu-latest
    name: Review all OpenAPI specs
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Review OpenAPI specs
        uses: blake-mealey/openapi-review-action@v1
        with:
          spec-paths: ./fixtures/*.@(json|yaml|yml)
          github-token: ${{ secrets.GITHUB_TOKEN }}

Submission Category:

Maintainer Must-Haves

Yaml File or Link to Code

GitHub logo blake-mealey / openapi-review-action

A GitHub action that posts your OpenAPI docs as a comment to your PR whenever they change.

OpenAPI Review Action

A GitHub action for reviewing changes to your OpenAPI specs.

This action posts a comment to your PR whenever you make a change to an OpenAPI spec file, with helpful details for your reviewers to catch more potential problems and give better feedback!

  • Review your spec's diff to make sure you aren't introducing breaking changes for your users
  • Make sure your API's docs are complete and up to snuff before accepting a change

Powered by openapi-diff and widdershins!

Supported events:

  • pull_request

Example usage

# Make sure you checkout your repo before first!
- uses: actions/checkout@v1
- uses: blake-mealey/openapi-review-action@v1
  with
    spec-paths: ./specs/*.yaml
    github-token: ${{ secrets.GITHUB_TOKEN }}

Inputs

spec-paths (required)

The paths to the OpenAPI specs to process (single glob or array of globs). See the glob package for information on glob syntax support. JSON and yaml files are supported. Relative paths…

Additional Resources / Info

Screenshots:

OpenAPI Review Comment

Example PR:

https://github.com/blake-mealey/openapi-review-action/pull/22

Top comments (0)