Add OpenAPI spec for Stainless SDK generation - #42
Open
scottfrasso wants to merge 2 commits into
Open
Conversation
Add camelCase operationId and resource tags to all 37 API routes so Stainless can generate a clean client SDK. Exclude SPA/favicon routes from the schema, add a generation script and regression test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move perception/trajectory endpoints from "Runs" to "Perception" tag - Move settings endpoints from "Setup" to "Settings" tag - Add trailing comma to fix ruff COM812 lint error Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
Code reviewFound 2 issues:
Both issues are fixed in e13e4c3 by moving to per-route tags where the router contains mixed resource types. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
operationIdand resourcetagsto all 37 API route decorators across 7 route files + 2 meta routes inmain.pyinclude_in_schema=Falsescripts/generate_openapi.pyto exportopenapi-spec.jsonfrom the FastAPI apptests/test_openapi.pyregression test that validates every operation has a camelCase ID and at least one tagTest plan
uv run pytest tests/test_openapi.py -v— new test passesuv run pytest tests/ -v— all 216 tests passuv run python -m scripts.generate_openapi— generatesopenapi-spec.jsonwith 28 paths🤖 Generated with Claude Code