Enhance platformAPI documentation to reflect changes in resource handling and request structures#2436
Conversation
…dling and request structures.
📝 WalkthroughWalkthroughThis PR updates the platform-api documentation to use handle-based resource identifiers, revised gateway and deployment request/response shapes, updated REST API lifecycle contracts, and refreshed websocket event schemas and configuration examples. ChangesHandle-based API documentation
Gateway management docs
Websocket event docs
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
platform-api/spec/impls/gateway-management/gateway-management.md (1)
563-569: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRename the conflict text to use handles.
The error list still says “duplicate gateway name,” but this document now treats the gateway
idas the handle. Update the message to “duplicate gateway handle” so it matches the rest of the contract.Suggested edit
- **409 Conflict**: Duplicate gateway name within organization + **409 Conflict**: Duplicate gateway handle within organization🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@platform-api/spec/impls/gateway-management/gateway-management.md` around lines 563 - 569, The Error Responses section still refers to “duplicate gateway name,” but the contract now uses the gateway id as the handle. Update the 409 Conflict description in the gateway-management spec to say “duplicate gateway handle” so it matches the terminology used elsewhere in the document.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@platform-api/spec/impls/gateway-management/gateway-management.md`:
- Around line 68-83: Update the gateway registration/token flow wording in the
gateway-management spec so it is internally consistent: the registration step
described near the gateway creation bullets should match the later token
lifecycle rules and the note about POST /gateways/{gatewayId}/tokens. Remove or
rewrite any line that says registration generates a token if registration does
not return one, and align the surrounding Request Fields/Uniqueness text with
the chosen flow using the gateway registration and token endpoint terminology.
---
Outside diff comments:
In `@platform-api/spec/impls/gateway-management/gateway-management.md`:
- Around line 563-569: The Error Responses section still refers to “duplicate
gateway name,” but the contract now uses the gateway id as the handle. Update
the 409 Conflict description in the gateway-management spec to say “duplicate
gateway handle” so it matches the terminology used elsewhere in the document.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 116ce215-471a-449d-8a48-1ac0ec59b4cd
📒 Files selected for processing (6)
platform-api/README.mdplatform-api/spec/impls/api-lifecycle-management.mdplatform-api/spec/impls/gateway-management/gateway-management.mdplatform-api/spec/impls/gateway-websocket-events/gateway-websocket-events.mdplatform-api/spec/impls/organization-management.mdplatform-api/spec/impls/project-management.md
…ng that the registration does not generate or return a token, and that a separate call is required to obtain one.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
platform-api/spec/impls/api-lifecycle-management.md (1)
25-30: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAlign the entry-point summary with the list route.
/api/v0.9/projects/:projectId/apisis stale here; the handler/OpenAPI use/api/v0.9/rest-apis?projectId=..., which matches the verification example below. Update line 5 so readers don’t test the wrong path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@platform-api/spec/impls/api-lifecycle-management.md` around lines 25 - 30, The entry-point summary is stale and references the wrong list route for REST APIs. Update the API lifecycle management verification notes to match the actual list endpoint used by the handler/OpenAPI, and keep the example consistent with the `/api/v0.9/rest-apis?projectId=...` query pattern shown below so readers don’t validate against the deprecated `/api/v0.9/projects/:projectId/apis` path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@platform-api/spec/impls/api-lifecycle-management.md`:
- Around line 25-30: The entry-point summary is stale and references the wrong
list route for REST APIs. Update the API lifecycle management verification notes
to match the actual list endpoint used by the handler/OpenAPI, and keep the
example consistent with the `/api/v0.9/rest-apis?projectId=...` query pattern
shown below so readers don’t validate against the deprecated
`/api/v0.9/projects/:projectId/apis` path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e83bf1c9-e3d8-4ae6-aeaa-b9484db0ef2c
📒 Files selected for processing (4)
platform-api/README.mdplatform-api/spec/impls/api-lifecycle-management.mdplatform-api/spec/impls/gateway-websocket-events/gateway-websocket-events.mdplatform-api/spec/impls/organization-management.md
✅ Files skipped from review due to trivial changes (1)
- platform-api/README.md
🚧 Files skipped from review as they are similar to previous changes (2)
- platform-api/spec/impls/organization-management.md
- platform-api/spec/impls/gateway-websocket-events/gateway-websocket-events.md
Update organization, project, and gateway management sections to clarify the use of handles instead of UUIDs, and improve examples for API creation and deployment processes. Adjust WebSocket event descriptions to differentiate between internal UUIDs and handle-based identifiers.