Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/cli-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ on:
pull_request:
branches: [main]
paths:
- "fastapi_code_generator/**"
- "fastapi_code_generator/__main__.py"
- "fastapi_code_generator/cli.py"
- "tests/cli_doc/**"
- "tests/main/**"
- "tests/data/openapi/**"
- "scripts/build_cli_docs.py"
- "scripts/build_prompt_data.py"
- "scripts/build_schema_docs.py"
- "docs/cli-reference.md"
- "fastapi_code_generator/prompt_data.py"
- "tox.ini"
- "pyproject.toml"
- ".github/workflows/cli-docs.yml"

permissions:
Expand Down Expand Up @@ -45,4 +42,4 @@ jobs:
- name: Build CLI docs
run: .tox/cli-docs/bin/python scripts/build_cli_docs.py
- name: Build prompt data
run: .tox/cli-docs/bin/python scripts/build_prompt_data.py --output fastapi_code_generator/prompt_data.py
run: .tox/cli-docs/bin/python scripts/build_prompt_data.py
2 changes: 1 addition & 1 deletion .github/workflows/config-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- run: uv tool install --python 3.14 tox --with tox-uv
if: steps.preflight.outputs.enabled == 'true'

- run: tox -e config-types -- --check
- run: tox -e config-types
Comment thread
koxudaxi marked this conversation as resolved.
if: steps.preflight.outputs.enabled == 'true'

- name: Skip when config-types support is not present
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,21 @@ jobs:
python-version: "3.14"
- name: Install dependencies
run: uv sync --frozen --group docs
- name: Copy CHANGELOG to docs
run: |
if [ -f CHANGELOG.md ]; then
cp CHANGELOG.md docs/changelog.md
else
echo "# Changelog" > docs/changelog.md
echo "" >> docs/changelog.md
echo "Changelog will be available after the first release." >> docs/changelog.md
fi
- name: Update GitHub Action version in docs
run: uv run python scripts/update_docs_version.py
env:
GH_TOKEN: ${{ github.token }}
- name: Build site
run: uv run zensical build --clean
- name: Validate Cloudflare credentials
if: inputs.deploy_branch != ''
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
if [ -z "$CLOUDFLARE_API_TOKEN" ]; then
echo "::error::CLOUDFLARE_API_TOKEN is required when deploy_branch is set"
exit 1
fi
if [ -z "$CLOUDFLARE_ACCOUNT_ID" ]; then
echo "::error::CLOUDFLARE_ACCOUNT_ID is required when deploy_branch is set"
exit 1
fi
- name: Deploy
if: inputs.deploy_branch != ''
env:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/generated-docs-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,11 @@ jobs:
- name: Build CLI docs
run: .tox/cli-docs/bin/python scripts/build_cli_docs.py
- name: Build prompt data
run: .tox/cli-docs/bin/python scripts/build_prompt_data.py --output fastapi_code_generator/prompt_data.py
run: .tox/cli-docs/bin/python scripts/build_prompt_data.py
- name: Build schema docs
run: .tox/schema-docs/bin/python scripts/build_schema_docs.py
- name: Build llms.txt
run: .tox/llms-txt/bin/python scripts/build_llms_txt.py
- name: Update GitHub Action version in docs
run: python3 scripts/update_docs_version.py
env:
GH_TOKEN: ${{ github.token }}
- name: Create generated docs patch
id: patch
env:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/llms-txt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ on:
paths:
- "README.md"
- "docs/**/*.md"
- "fastapi_code_generator/**"
- "tests/main/**"
- "tests/cli_doc/**"
- "tests/data/openapi/**"
- "scripts/build_cli_docs.py"
- "scripts/build_prompt_data.py"
- "scripts/build_schema_docs.py"
- "docs/llms.txt"
- "docs/llms-full.txt"
- "zensical.toml"
- "scripts/build_llms_txt.py"
- "tox.ini"
- "pyproject.toml"
- ".github/workflows/llms-txt.yml"

permissions:
Expand Down Expand Up @@ -56,7 +61,7 @@ jobs:
- name: Build CLI docs
run: .tox/cli-docs/bin/python scripts/build_cli_docs.py
- name: Build prompt data
run: .tox/cli-docs/bin/python scripts/build_prompt_data.py --output fastapi_code_generator/prompt_data.py
run: .tox/cli-docs/bin/python scripts/build_prompt_data.py
- name: Build schema docs
run: .tox/schema-docs/bin/python scripts/build_schema_docs.py
- name: Build llms.txt
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
enable-cache: true
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Check CLI docs
run: tox -e cli-docs -- --check
- name: Build CLI docs
run: tox -e cli-docs
Comment thread
koxudaxi marked this conversation as resolved.
- name: Rename coverage file
run: |
import os
Expand Down Expand Up @@ -87,8 +87,12 @@ jobs:
enable-cache: true
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Check README snapshots
run: tox -e readme -- --check
- name: Setup README environment
run: tox run -vv --notest --skip-missing-interpreters false -e readme
env:
UV_PYTHON_PREFERENCE: "only-managed"
- name: Update README
run: .tox/readme/bin/python scripts/update_command_help_on_markdown.py

llms-txt:
name: llms.txt
Expand All @@ -106,8 +110,8 @@ jobs:
enable-cache: true
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Check llms.txt artifacts
run: tox -e llms-txt -- --check
- name: Build llms.txt artifacts
run: tox -e llms-txt

schema-docs:
name: Schema docs
Expand All @@ -125,8 +129,8 @@ jobs:
enable-cache: true
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Check supported formats docs
run: tox -e schema-docs -- --check
- name: Build supported formats docs
run: tox -e schema-docs

config-types:
name: Config types
Expand All @@ -144,8 +148,8 @@ jobs:
enable-cache: true
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Check generated config types
run: tox -e config-types -- --check
- name: Build generated config types
run: tox -e config-types

docs:
name: Docs
Expand Down
14 changes: 13 additions & 1 deletion docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,26 @@ Show the installed fastapi-codegen version.

`fastapi-codegen --version`

### --input, --output
### --output

Directory where the generated FastAPI application is written.

`fastapi-codegen --input openapi/default_template/simple.yaml --output app`

Input schema: `openapi/default_template/simple.yaml`

Related options: `--input`

### --input

Generate a FastAPI application from an OpenAPI input file.

`fastapi-codegen --input openapi/default_template/simple.yaml --output app`

Input schema: `openapi/default_template/simple.yaml`

Related options: `--output`

### --template-dir

Render generated files with a custom template directory.
Expand Down
14 changes: 13 additions & 1 deletion docs/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,26 @@ Show the installed fastapi-codegen version.

`fastapi-codegen --version`

### --input, --output
### --output

Directory where the generated FastAPI application is written.

`fastapi-codegen --input openapi/default_template/simple.yaml --output app`

Input schema: `openapi/default_template/simple.yaml`

Related options: `--input`

### --input

Generate a FastAPI application from an OpenAPI input file.

`fastapi-codegen --input openapi/default_template/simple.yaml --output app`

Input schema: `openapi/default_template/simple.yaml`

Related options: `--output`

### --template-dir

Render generated files with a custom template directory.
Expand Down
Loading
Loading