alexandrelamberty / openapi-stoplight-doc-action

:zap: GitHub Actions that generate API documentation from your OpenAPI specification using Stoplight.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go CI

OpenAPI Documentation Action

Action for generating documentation using the Web Component elements from stoplightio.

Usage

Example workflow

name: Documentation
on: 
    push:
        branches: ["master"]

jobs:
    doc:
        name: Documentation
        runs-on: ubuntu-latest
        steps:
            - name: Checkout
              uses: actions/checkout@v4

            - name: Build
              uses: alexandrelamberty/openapi-stoplight-doc-action@v1.0.0
              with:
                  title: My API Documentation
                  file: ./api-spec.yaml
                  directory: ./docs

            - name: Publish
              uses: peaceiris/actions-gh-pages@v3
              with:
                  github_token: ${{ secrets.GITHUB_TOKEN }}
                  publish_dir: ./docs

Inputs

  • title (optional): The title of the generated documentation. Defaults to API Documentation.
  • file (optional): The path to your OpenAPI specification file in YAML format. Defaults to api.yaml.
  • directory (optional): The directory where the documentation will be generated. Defaults to the root of your repository.

About

:zap: GitHub Actions that generate API documentation from your OpenAPI specification using Stoplight.


Languages

Language:Go 89.3%Language:Makefile 10.7%