Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexandrelamberty/openapi-stoplight-doc-action

:zap: GitHub Actions that generate API documentation from your OpenAPI specification using Stoplight.
https://github.com/alexandrelamberty/openapi-stoplight-doc-action

api documentation elements openapi spec stoplightio

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

[![Go CI](https://github.com/alexandrelamberty/openapi-stoplight-doc-action/actions/workflows/golang.yaml/badge.svg)](https://github.com/alexandrelamberty/openapi-stoplight-doc-action/actions/workflows/golang.yaml)

# OpenAPI Documentation Action

Action for generating documentation using the Web Component
[elements](https://github.com/stoplightio/elements) from
[stoplightio](https://github.com/stoplightio/).

## Usage

### Example workflow

```yaml
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/[email protected]
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.