Skip to content

feat(asm): complete Tags resource — add GET, PATCH, DELETE /tags/{tag_id}#22

Open
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-riqjn9
Open

feat(asm): complete Tags resource — add GET, PATCH, DELETE /tags/{tag_id}#22
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-riqjn9

Conversation

@dmchaledev

Copy link
Copy Markdown
Contributor

Problem

The Tags resource in asm/openapi.yaml was incomplete. Developers could list all tags (GET /tags) and create a tag (POST /tags), but had no way to:

  • Retrieve a specific tag by ID
  • Rename a tag or change its color
  • Delete a tag they no longer need

Every other resource in the spec (Assets, Vulnerabilities) already exposes a full single-resource path with GET, PATCH, and DELETE. Tags were the odd one out, which would confuse API consumers and make tag lifecycle management impossible without a round-trip list.

Changes

asm/openapi.yaml (+79 lines, no deletions):

Change Details
GET /tags/{tag_id} Retrieve a single tag by ID
PATCH /tags/{tag_id} Update name and/or color
DELETE /tags/{tag_id} Permanently delete a tag and remove it from all assets
components/parameters/TagId Reusable tag_id path parameter (mirrors AssetId)
components/schemas/TagUpdate Request body schema for PATCH
listTags description Added missing description field
createTag description Added missing description field

All new operations follow the exact same patterns already established by the Assets and Vulnerabilities resources (shared error responses, operationId naming, tag grouping).

Test plan

  • spectral lint asm/openapi.yaml --ruleset spectral:oas passes (validated by the existing CI workflow)
  • GET /tags/{tag_id} renders correctly in the Redoc preview
  • PATCH /tags/{tag_id} shows TagUpdate request body schema
  • DELETE /tags/{tag_id} shows 204 No Content response

🤖 Generated with Claude Code

https://claude.ai/code/session_01NiDvq31B2krChD32LkopDV


Generated by Claude Code

The Tags resource was missing single-resource operations that every other
resource (Assets, Vulnerabilities) already exposes. Adds GET /tags/{tag_id},
PATCH /tags/{tag_id}, and DELETE /tags/{tag_id}, plus the TagId path
parameter, TagUpdate request schema, and descriptions on listTags/createTag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiDvq31B2krChD32LkopDV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants