-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add static OpenAPI reference page with Scalar UI #319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
51f1ffd
75bf3cd
5f6bb2e
dbcaf1f
4e2de83
ebea18c
2d73ff9
bb9dd9b
6cb06cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| name: no-future-annotations | ||
| enabled: true | ||
| event: file | ||
| pattern: from\s+__future__\s+import\s+annotations | ||
| action: block | ||
| --- | ||
|
|
||
| **`from __future__ import annotations` is forbidden in this project.** | ||
|
|
||
| Python 3.14 has PEP 649 native lazy annotations, making this import unnecessary. | ||
| The project CLAUDE.md explicitly states: "No `from __future__ import annotations`". | ||
|
|
||
| Remove this import and use native type hints directly. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| rules: | ||
| # Daily Dependabot updates are intentional — see CLAUDE.md and dependabot.yml. | ||
| # The project uses daily checks with grouped minor/patch to stay current. | ||
| dependabot-cooldown: | ||
| disable: true |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -38,21 +38,25 @@ uv run pytest tests/ -m integration -n auto # integration tests only | |||||||||||||||||
| uv run pytest tests/ -m e2e -n auto # e2e tests only | ||||||||||||||||||
| uv run pytest tests/ -n auto --cov=ai_company --cov-fail-under=80 # full suite + coverage | ||||||||||||||||||
| uv run pre-commit run --all-files # all pre-commit hooks | ||||||||||||||||||
| uv run python scripts/export_openapi.py # export OpenAPI schema (needed before mkdocs build) | ||||||||||||||||||
| uv run mkdocs build --strict # build docs (output: _site/docs/) | ||||||||||||||||||
| uv run mkdocs serve # local docs preview (http://127.0.0.1:8000) | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Documentation | ||||||||||||||||||
|
|
||||||||||||||||||
| - **Docs source**: `docs/` (MkDocs markdown + mkdocstrings auto-generated API reference) | ||||||||||||||||||
| - **Docs source**: `docs/` (MkDocs markdown) | ||||||||||||||||||
| - **Design spec**: `docs/design/` (7 pages: index, agents, organization, communication, engine, memory, operations) | ||||||||||||||||||
| - **Architecture**: `docs/architecture/` (overview, tech-stack, decision log) | ||||||||||||||||||
| - **Roadmap**: `docs/roadmap/` (status, open questions, future vision) | ||||||||||||||||||
| - **Reference**: `docs/reference/` (research, standards) | ||||||||||||||||||
| - **REST API reference**: `docs/rest-api.md` — static Scalar UI page, loads OpenAPI schema from `docs/_generated/openapi.json` (generated by `scripts/export_openapi.py` in CI) | ||||||||||||||||||
| - **Library reference**: `docs/api/` — auto-generated from docstrings via mkdocstrings + Griffe (AST-based, no imports) | ||||||||||||||||||
| - **Custom templates**: `docs/overrides/` (MkDocs `custom_dir` — e.g. `rest-api.html` for the Scalar API page) | ||||||||||||||||||
|
||||||||||||||||||
| - **Custom templates**: `docs/overrides/` (MkDocs `custom_dir` — e.g. `rest-api.html` for the Scalar API page) | |
| - **Custom templates**: `docs/overrides/` (MkDocs `custom_dir` for optional theme/template overrides) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Minor style nit: add comma after "e.g." on line 55.
Standard English style uses a comma after "e.g." (and "i.e.").
Suggested fix
-- **Custom templates**: `docs/overrides/` (MkDocs `custom_dir` — e.g. `rest-api.html` for the Scalar API page)
+- **Custom templates**: `docs/overrides/` (MkDocs `custom_dir` — e.g., `rest-api.html` for the Scalar API page)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **REST API reference**: `docs/rest-api.md` — static Scalar UI page, loads OpenAPI schema from `docs/_generated/openapi.json` (generated by `scripts/export_openapi.py` in CI) | |
| - **Library reference**: `docs/api/` — auto-generated from docstrings via mkdocstrings + Griffe (AST-based, no imports) | |
| - **Custom templates**: `docs/overrides/` (MkDocs `custom_dir` — e.g. `rest-api.html` for the Scalar API page) | |
| - **Scripts**: `scripts/` — CI/build utility scripts (relaxed ruff rules: `print` and deferred imports allowed) | |
| - **REST API reference**: `docs/rest-api.md` — static Scalar UI page, loads OpenAPI schema from `docs/_generated/openapi.json` (generated by `scripts/export_openapi.py` in CI) | |
| - **Library reference**: `docs/api/` — auto-generated from docstrings via mkdocstrings + Griffe (AST-based, no imports) | |
| - **Custom templates**: `docs/overrides/` (MkDocs `custom_dir` — e.g., `rest-api.html` for the Scalar API page) | |
| - **Scripts**: `scripts/` — CI/build utility scripts (relaxed ruff rules: `print` and deferred imports allowed) |
🧰 Tools
🪛 LanguageTool
[style] ~55-~55: A comma is missing here.
Context: ...docs/overrides/(MkDocscustom_dir— e.g.rest-api.html` for the Scalar API page...
(EG_NO_COMMA)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CLAUDE.md` around lines 53 - 56, Update the bullet that mentions
"docs/overrides/ (MkDocs `custom_dir` — e.g. `rest-api.html` for the Scalar API
page)" by inserting a comma after "e.g." so it reads "e.g., `rest-api.html`" to
follow standard English style; locate the line referencing "docs/overrides/" and
"rest-api.html" and make the punctuation change in CLAUDE.md.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # API Reference | ||
| # Library Reference | ||
|
|
||
| Auto-generated reference documentation from source code docstrings. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,7 @@ | ||||||
| # REST API Reference | ||||||
|
|
||||||
| Interactive API documentation powered by [Scalar](https://scalar.com/) and the OpenAPI schema exported from the Litestar application. | ||||||
|
|
||||||
| **[Open REST API Reference :material-open-in-new:](_generated/api-reference.html){ .md-button .md-button--primary }** | ||||||
|
||||||
| **[Open REST API Reference :material-open-in-new:](_generated/api-reference.html){ .md-button .md-button--primary }** | |
| **[Open REST API Reference :material-open-in-new:](../_generated/api-reference.html){ .md-button .md-button--primary }** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hookify rule uses wrong schema —
conditions:block is missingThe
pattern:key here is placed at the top level of the front matter, but in every other hookify rule in this project (hookify.function-length.md,hookify.missing-logger.md) the matching criteria live inside aconditions:array with explicitfield:,operator:, andpattern:fields.Without a
conditions:block the hook has no predicate to evaluate: depending on how hookify handles an unknown top-levelpattern:key, this rule will either fire on every file event (very noisy) or never fire at all (silently skipping the check it's supposed to enforce).The equivalent structured form, consistent with the other rules, would be:
Prompt To Fix With AI