Skip to content

DELETE /destinations response inconsistent with DELETE /tenants #705

@alexluong

Description

@alexluong

Summary

DELETE /tenants/{tenant_id} returns { "success": true } (SuccessResponse), but DELETE /tenants/{tenant_id}/destinations/{destination_id} returns the full Destination object.

The OpenAPI spec documents both as returning SuccessResponse, but the destination delete handler actually returns the deleted destination.

Current behavior

DELETE /tenants/{tid}tenant_handlers.go

c.JSON(http.StatusOK, gin.H{"success": true})

DELETE /tenants/{tid}/destinations/{did}destination_handlers.go

c.JSON(http.StatusOK, display) // returns full DestinationDisplay

Options

  1. Fix code — Change destination delete to return { "success": true } to match the tenant pattern and the current OpenAPI spec
  2. Fix spec — Update the OpenAPI spec to document that destination delete returns the full Destination object (useful if callers want to confirm what was deleted)

Context

Found during a full OpenAPI spec audit against the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions