[CSM Portal] Document account/project contacts-search endpoints in entity-service OpenAPI spec - #1213
Conversation
POST /accounts/{id}/contacts/search and POST /projects/{id}/contacts/search
were implemented and wired in routes.go but never added to openapi.yaml.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds ServiceNow-only OpenAPI contracts for account and project contact search, including paginated request filters, contact response schemas, operation definitions, and documented success and error responses. ChangesContact search API
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)entity-service/openapi.yamlTraceback (most recent call last): 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 |
Purpose
POST /accounts/{id}/contacts/searchandPOST /projects/{id}/contacts/searchare implemented and routed in the Go entity-service (handlers, services, androutes.go), but were never added toopenapi.yaml. The Ballerina entity-service already documents both equivalent paths.Goals
Bring
entity-service/openapi.yamlin sync with the code so both contacts-search endpoints are discoverable in the spec, matching the request/response shapes already used by the handlers.Approach
Added
POST /accounts/{id}/contacts/searchandPOST /projects/{id}/contacts/searchpath entries plus their request/response schemas (SearchAccountContactsRequest/Response,AccountContact,SearchProjectContactsRequest/Response,ProjectContact), following the existing conventions in the file (same style as the neighboring/accounts/searchand/projects/searchentries). Schema fields were checked against the actual Go structs (internal/domain/entity.go) to keep the spec accurate. Docs-only change — no code touched.User stories
N/A — documentation-only change, no behavior change.
Release note
N/A — internal API documentation fix, not a user-facing change.
Documentation
N/A — this PR is the documentation fix (OpenAPI spec).
Automation tests
python3 -c "import yaml; yaml.safe_load(...)") andgo vet ./...remains clean.Security checks
go vet ./...ran clean.Samples
N/A
Related PRs
N/A
Migrations (if applicable)
N/A
Test environment
N/A — docs-only change.
Learning
N/A
Summary by CodeRabbit