Add input validation for deploymentId and gatewayId in RestoreDeployment handler
@senthuran16 is already working on this.
Since May 20, 2026.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Summary
The RestoreDeployment handler in platform-api/src/internal/handler/webbroker_api_deployment.go does not validate that deploymentId and gatewayId are non-empty before invoking the service layer. This can result in unclear errors reaching the client instead of an explicit 400 Bad Request response.
The UndeployDeployment handler in the same file already performs these checks and can serve as the reference implementation.
Expected Behavior
If deploymentId or gatewayId is empty, the handler should return HTTP 400 with a descriptive error message before calling RestoreWebBrokerAPIDeploymentByHandle.
References
- Pull request: https://github.com/wso2/api-platform/pull/1992
- Review comment: https://github.com/wso2/api-platform/pull/1992#discussion_r3273481529
Requested by @senthuran16
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.