docs: Add REST endpoint guidance#3031
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Summary by CodeRabbit
WalkthroughThis PR updates rest-api/AGENTS.md documentation, revising OpenAPI update scope guidance, introducing standardized naming conventions for handlers/models, adding a "REST endpoint implementation patterns" section covering endpoint families and handler thin-layer conventions, and expanding the endpoint testing checklist. ChangesREST endpoint guidance
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This is great @kfelternv A few other things to add:
|
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-3031.docs.buildwithfern.com/infra-controller |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-07-01 15:07:13 UTC | Commit: d1412af |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
rest-api/AGENTS.md (2)
270-281: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd the pagination response-header contract to the checklist.
The checklist covers paging inputs, but not the response-side pagination header required for multi-object GETs in the PR objectives. Call that out here so endpoint authors assert the full contract, not just request validation.
🤖 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 `@rest-api/AGENTS.md` around lines 270 - 281, The endpoint testing checklist is missing the response-side pagination header contract for multi-object GETs, so update the guidance in AGENTS to explicitly require asserting the pagination header behavior as part of endpoint tests. Add this alongside the existing paging input checks so authors cover both request validation and response headers, especially in the sections covering handler tests and route/OpenAPI coverage.
267-269: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winScope the OpenAPI requirement to published routes.
This reads like every new route must update
openapi/spec.yaml, but the same section explicitly exempts system/public discovery routes fromNewAPIRoutes. Tighten it to routes that are actually part of the OpenAPI surface.🤖 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 `@rest-api/AGENTS.md` around lines 267 - 269, Tighten the OpenAPI update requirement in AGENTS.md so it applies only to routes that are actually published in the OpenAPI surface, not every new route. Clarify the guidance around NewAPIRoutes by explicitly exempting system/public discovery routes and any other non-OpenAPI endpoints, while still requiring openapi/spec.yaml updates for documented API routes. Keep the instruction aligned with the existing references to openapi/spec.yaml, NewAPIRoutes, and the SDK-facing naming guidance.
🤖 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.
Nitpick comments:
In `@rest-api/AGENTS.md`:
- Around line 270-281: The endpoint testing checklist is missing the
response-side pagination header contract for multi-object GETs, so update the
guidance in AGENTS to explicitly require asserting the pagination header
behavior as part of endpoint tests. Add this alongside the existing paging input
checks so authors cover both request validation and response headers, especially
in the sections covering handler tests and route/OpenAPI coverage.
- Around line 267-269: Tighten the OpenAPI update requirement in AGENTS.md so it
applies only to routes that are actually published in the OpenAPI surface, not
every new route. Clarify the guidance around NewAPIRoutes by explicitly
exempting system/public discovery routes and any other non-OpenAPI endpoints,
while still requiring openapi/spec.yaml updates for documented API routes. Keep
the instruction aligned with the existing references to openapi/spec.yaml,
NewAPIRoutes, and the SDK-facing naming guidance.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: af1d553a-4632-444f-9f9b-0c3153fc473c
📒 Files selected for processing (1)
rest-api/AGENTS.md
|
Making a few final tweaks to the instructions, will merge afterwards. |
Signed-off-by: Kyle Felter <[email protected]>
875cd17 to
a778d70
Compare
thossain-nv
left a comment
There was a problem hiding this comment.
Thanks for this @kfelternv
Add some specific guidance to the agents.md file for development work against the REST api for NICo