Prevent gateway deletion when active API deployments exist
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Description
Add validation to prevent deletion of gateways that have active API deployments. This safety check ensures that gateways actively serving APIs cannot be accidentally deleted.
Acceptance Criteria
- Gateway deletion is blocked when the gateway has one or more active API deployments
- API returns HTTP 409 Conflict response with deployment count in error message
- Error message format: "Cannot delete gateway - X active API deployment(s) exist"
- Validation occurs before the actual deletion operation
- Deletion succeeds when all API deployments are removed
Testing
Test Case 1: Block deletion with active deployments
- Create a gateway
- Deploy one or more APIs to the gateway
- Attempt to delete the gateway
- Verify: HTTP 409 Conflict response with deployment count
Test Case 2: Allow deletion after removing deployments
- Remove all API deployments from the gateway
- Attempt to delete the gateway
- Verify: HTTP 204 No Content (successful deletion)
Related
https://github.com/wso2/api-platform/pull/66
Version
Platform API v1
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.
Research direction
The issue names no files or tests; begin at the gateway deletion API entry point and trace how active API deployments are represented and counted. Add the described conflict behavior before deletion, then verify both deployment-blocked and deployment-free cases, including the specified status codes and error message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100