Repository navigation
feat(organization): publish the team and project routes in the api reference - #4413
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
4fec9c1 to
5af03b9
Compare
e87bfc2 to
42502f3
Compare
42502f3 to
d921987
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4413 +/- ##
==========================================
+ Coverage 94.08% 94.29% +0.20%
==========================================
Files 1773 1664 -109
Lines 50963 48142 -2821
Branches 12435 11883 -552
==========================================
- Hits 47951 45394 -2557
+ Misses 2702 2454 -248
+ Partials 310 294 -16
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
d921987 to
1da3c62
Compare
…ference A route behind a feature flag stayed out of the served docs for everyone. The organizations flag is now published: its routes appear in /v1/doc while the flag still decides who may call them. The invitation preview, hidden because it is public, is published with them.
…outes The team and project routes go into the published reference once the organizations flag reaches customers, so their responses now say what the code returns. Member, invitation, project and budget routes list the 400 a malformed id gets, the ownership transfer names owner_role_restricted for admins only, and the invitation routes cover a deleted team. Lease create, deployment create, template save and account deletion name the team codes they can return. A docs test fails when any route but the withheld billing ones drops out of /v1/doc, so a new team route cannot stay hidden. The committed openapi.json and console-api-types are regenerated.
…api-types #4545 made the proposal id a positive integer but left console-api-types generated from the older nullable schema. Regenerated from the current openapi.json.
1da3c62 to
b152713
Compare
|
@claude review |
There was a problem hiding this comment.
An organization admin can view or raise the monthly spending cap at claude.ai/admin-settings/usage, on the Claude Code Review row under Services. The cap resets at the start of the next billing period.
Once the cap resets or is raised, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
PUBLISHED_FEATURE_FLAGSincreateRoute: routes behindFeatureFlags.ORGANIZATIONSare no longer registered inHIDDEN_ROUTES, sostripHiddenOperationsserves them in/v1/doc, whilerequireFeatureFlagstill decides per caller who may reach them.INVOICESstays unpublished, so the 16 billing routes stay withheld.- Unhiding
POST /v1/invitations/preview: the public token-preview route dropshiddenInOpenApiDocs, joiningacceptin the published reference. - Error-response audit: the published routes' descriptions were checked against the code — added the 400 a malformed uuid gets, corrected the ownership-transfer 403 to say only an admin gets
owner_role_restricted(a member is refused by the ability gate first), covered the deleted-team 404 on invitation preview/accept, named the codes account deletion and template save return, and fixed the deposit 400 (its denom is fixed by config, sounsupported_deposit_denomcan only come fromPOST /v1/sign-and-broadcast-tx, which keeps documenting it). - Test guards:
docs.spec.tsgains an invariant that the served doc withholds exactly the 16 billing routes, andcreate-route.spec.tscovers the published-flag case; the snapshot is regenerated. - Regenerated artifacts:
swagger/openapi.json(description-only diff — the committed spec is built withincludeHidden: trueand already carried the org routes) andconsole-api-types, which also picks up main's unregenerated drift: the templateprojectIdfield and 403/404 responses, and the proposals{id}path param now typednumber.
I verified the withholding end-to-end (the internal hidden routes live on internalOpenApiHonoHandlers, so they don't leak into the served doc or the new test), traced the description claims to their services, and ran both new spec files: they pass on this head, and reverting only create-route.ts to main makes the unit test fail 1/19 and the functional test fail listing exactly the 35 org routes — so both guards do their job.
GLM-5.3 | 𝕏

Why
Fixes CON-1266
The team and project endpoints were left out of the published API reference while the
organizationsflag was staff-only. The flag widens to customers with the Organizations & Projects launch, so the reference should list them.What
createRoutekeeps a set of published feature flags. A route behind one of them shows up in the served/v1/docwhile the flag still decides who may call it.organizationsis the only one, so theinvoicesroutes stay hiddenorganizationsplus the publicPOST /v1/invitations/preview: organizations, members, invitations, projects, project grants, budgets, spend, activity, deployment move and location, and account deletion eligibility. Each signed-in one lists thex-organization-idandx-project-idheadersowner_role_restrictedon ownership transfer, covered a deleted team on invitation preview and accept, and named the team codes that lease create, deployment create, template save and account deletion returnswagger/openapi.jsonandconsole-api-types, which also pick up drift main had not regenerated: the template project fields and the proposal id path param from fix(network): answer 400 to a proposal id that is not a positive integer #4545Testing
docs.spec.ts: new test fails when any route but the withheld billing ones drops out of/v1/doc, so a new team route cannot stay hidden. Snapshot updatedcreate-route.spec.ts: a route behind a published flag is served and still gated. Mutation score 100% on the changed linesdocs.spec.ts, lint and tsc passSummary by CodeRabbit
Documentation
API Updates