wso2 / wso2/api-platform

Prevent gateway deletion when active API deployments exist

Open
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type/Task
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

  1. Create a gateway
  2. Deploy one or more APIs to the gateway
  3. Attempt to delete the gateway
  4. Verify: HTTP 409 Conflict response with deployment count

Test Case 2: Allow deletion after removing deployments

  1. Remove all API deployments from the gateway
  2. Attempt to delete the gateway
  3. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.