Repository navigation
[CSM Portal] Add deployments search; fix product versions route; remove unused endpoint - #752
Conversation
📝 WalkthroughWalkthroughThis PR adds a new ChangesDeployment Search Endpoint
Sequence DiagramsequenceDiagram
participant Client
participant SearchDeployments
participant EntityClient
Client->>SearchDeployments: POST /deployments/search
SearchDeployments->>SearchDeployments: Extract user from context
alt No authenticated user
SearchDeployments-->>Client: 401 Unauthorized
end
SearchDeployments->>SearchDeployments: Read and validate body size
alt Body too large
SearchDeployments-->>Client: 413 Request Entity Too Large
end
SearchDeployments->>SearchDeployments: Validate JSON format
alt Invalid JSON
SearchDeployments-->>Client: 400 Bad Request
end
SearchDeployments->>EntityClient: SearchDeployments(body)
EntityClient-->>SearchDeployments: Response bytes or error
alt Upstream error
SearchDeployments-->>Client: Mapped HTTP error status
else Success
SearchDeployments-->>Client: 200 OK with JSON response
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Wires POST /deployments/search into the csm-portal backend, proxying to the entity service endpoint added in wso2-open-operations#751. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
949bba5 to
678f234
Compare
|
Actionable comments posted: 0 |
…ersions/search Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
POST /deployments/searchendpoint proxying to the entity service, withDeploymentHandler, entity client method, route registration, OpenAPI schema, and full test coverage/product/{id}/versions/searchto/products/{id}/versions/searchfor consistency with other resource routesGET /updates/recommended-update-levelsendpoint and all related types, mapper, client method, tests, and OpenAPI pathTest plan
go test ./...passes locallyPOST /deployments/searchproxies to entity service and returns deployment listprojectIdsanddeploymentTypeKeysworks end-to-endPOST /products/{id}/versions/searchstill resolves correctly with the renamed route🤖 Generated with Claude Code