Repository navigation
Generate API reference from OpenAPI #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate API reference from OpenAPI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "openapi_to_human.py" | |
| - "requirements.txt" | |
| - "examples/**" | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Generate Markdown | |
| run: | | |
| python openapi_to_human.py examples/openapi-min.yaml -o examples/output.md | |
| - name: Upload generated Markdown | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: api-reference-markdown | |
| path: examples/output.md |