blake-mealey / openapi-review-action

A GitHub action that posts your OpenAPI docs as a comment to your PR whenever they change.
MIT License
2 stars 0 forks source link

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!

⚡ Powered by openapi-diff and widdershins!

Supported events:

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 must start with ./.

spec-paths: ./your-spec.json
spec-paths: [./your-spec.yaml, ./your-spec.json]
spec-paths: [./root-spec.yaml, ./specs/*.yaml]

github-token (required)

Your GitHub token to allow the action to create PR comments. Use the ${{ secrets.GITHUB_TOKEN }} variable.

github-token: ${{ secrets.GITHUB_TOKEN }}

fail-on-breaking-changes (optional)

Defaults to true. Whether or not the action should report a failure if the openapi-diff report found breaking changes.

converter-options (optional)

Optionally pass options to the widdershins OpenAPI docs converter. See available options in their documentation.

converter-options:
  expandBody: true
  # ...