chore(api): hide duplicate /admin/accounts route from OpenAPI#4252
chore(api): hide duplicate /admin/accounts route from OpenAPI#4252bekossy merged 1 commit intorelease/v0.98.1from
Conversation
The legacy admin_router.create_accounts endpoint and the new fastapi/accounts/router.create_accounts both emit operation IDs that generate the same TypeScript method name in Fern client codegen. Excluding the legacy route from the OpenAPI schema removes the collision at the source, eliminating the need for downstream Fern post-processors to disambiguate the generated method.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbitRelease NotesNo user-visible changes in this release. This update makes internal adjustments to API documentation generation. WalkthroughThe ChangesOpenAPI Schema Exclusion
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
Railway Preview Environment
Updated at 2026-05-05T08:36:31.807Z |
Summary
The legacy
admin_router.create_accountsendpoint(
api/oss/src/routers/admin_router.py) and the newfastapi/accounts/router.create_accountsboth surface in the OpenAPIschema. Fern's TypeScript codegen collapses both to the same method
name (
createAccounts), forcing downstream Fern post-processors todisambiguate via a manual rename pass.
This excludes the legacy admin route from the schema with
include_in_schema=False, removing the collision at the source.Why
This is a prerequisite for cleaner Fern client generation (see the
feat/sdk/typescript-fern-clientPR, which currently carries a Pythonpost-processor in
clients/scripts/generate.shto rename the duplicatemethod). With this fix in place, the post-processor can eventually be
removed.
Diff
api/oss/src/routers/admin_router.py(1 insertion)Risks
include_in_schema=Falseonly hides theroute from the OpenAPI schema and any auto-generated docs/clients. The
HTTP endpoint itself (POST
/admin/accounts) continues to workunchanged. Anyone calling it directly via HTTP is unaffected.
rejected — exposure surface does not change.
QA
/admin/accountsdirectly (curl or Postman) — shouldreturn the same response as before
clients/scripts/generate.sh)and verify only one
createAccountsmethod appears in thegenerated TS admin client
admin_create_accountsoperation in the newfastapi/accounts/routeris still in the OpenAPI schema (it isthe canonical one going forward)