Skip to content

fix(API): improve delete /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} documentation#1191

Open
Stephen Lumenta (sbl) wants to merge 10 commits into
mainfrom
devex-118-keys-figma-attachments-detach-the-figma-attachment-from-a-key
Open

fix(API): improve delete /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} documentation#1191
Stephen Lumenta (sbl) wants to merge 10 commits into
mainfrom
devex-118-keys-figma-attachments-detach-the-figma-attachment-from-a-key

Conversation

@sbl

Copy link
Copy Markdown
Contributor

Improves the documentation for delete /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}: sharper descriptions, parameter docs, error responses, and usage examples.

Drafted with AI assistance and grounded in the API implementation. Please review for technical accuracy before merging; nothing is merged automatically.

🤖 Generated with Claude Code

Adds conceptual description (why/model/pitfalls including that detach
does not delete the attachment), documents 401/403/422 responses with
causes and remediation (feature gate, policy, already-detached error),
and improves branch parameter description.

Part of DEVEX-118.

🤖 Generated with Claude Code (claude-sonnet-4-6)
@sbl Stephen Lumenta (sbl) added the developer-hub-api-quality API doc quality fix from the API Grader label Jun 15, 2026
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

API changelog (oasdiff)

Doc-only edits (descriptions, examples) do not appear here.

15 changes: 2 error, 3 warning, 10 info
error	[request-property-became-enum] at doc/compiled.json
	in API POST /icu/skeleton
		request property `cldr_version` was restricted to a list of enum values

error	[response-media-type-removed] at doc/compiled.json
	in API GET /projects/{project_id}/keys/{id}/key_links
		removed the media type `application/json` for the response with the status `400`

warning	[optional-response-header-removed] at doc/compiled.json
	in API DELETE /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}
		the optional response header `x-rate-limit-limit` removed for the status `204`

warning	[optional-response-header-removed] at doc/compiled.json
	in API DELETE /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}
		the optional response header `x-rate-limit-remaining` removed for the status `204`

warning	[optional-response-header-removed] at doc/compiled.json
	in API DELETE /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}
		the optional response header `x-rate-limit-reset` removed for the status `204`

info	[request-body-one-of-added] at doc/compiled.json
	in API POST /icu/skeleton
		added `subschema #1, subschema #2` to the request body `oneOf` list

info	[request-property-enum-value-added] at doc/compiled.json
	in API POST /icu/skeleton
		added the new `cldr_41` enum value to the request property `cldr_version`

info	[request-property-enum-value-added] at doc/compiled.json
	in API POST /icu/skeleton
		added the new `legacy` enum value to the request property `cldr_version`

info	[response-non-success-status-added] at doc/compiled.json
	in API POST /icu/skeleton
		added the non-success response with the status `422`

info	[response-non-success-status-added] at doc/compiled.json
	in API DELETE /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}
		added the non-success response with the status `401`

info	[response-non-success-status-added] at doc/compiled.json
	in API DELETE /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}
		added the non-success response with the status `403`

info	[response-non-success-status-added] at doc/compiled.json
	in API DELETE /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}
		added the non-success response with the status `422`

info	[new-optional-request-property] at doc/compiled.json
	in API DELETE /projects/{project_id}/keys/{id}/key_links
		added the new optional request property `strategy`

info	[request-body-became-optional] at doc/compiled.json
	in API DELETE /projects/{project_id}/keys/{id}/key_links
		request body became optional

info	[response-media-type-added] at doc/compiled.json
	in API DELETE /projects/{project_id}/keys/{id}/key_links
		added the media type `application/json` for the response with the status `200`

@sbl Stephen Lumenta (sbl) changed the title feat(API): improve delete /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} documentation fix(API): improve delete /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} documentation Jun 17, 2026
Stephen Lumenta (sbl) and others added 5 commits June 17, 2026 21:10
…/keys/{id}

Apply the batch review conventions:
- Move the per-status 'Errors' table out of the top-level description and
  onto the response objects (401/403/404/422/429 now carry their own
  description), keeping only the endpoint purpose and feature-availability
  note in the description.
- Drop the '# Expected response: HTTP 204 ...' trailer from the curl
  sample so it shows only the request.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review feedback: error response descriptions should stay in the shared
responses.yaml for consistency, not be re-authored inline per operation.
Under OpenAPI 3.0 a description sibling of $ref is ignored anyway, so the
inline text never rendered. Strip the inline $ref-sibling response
descriptions (now bare $refs); the shared response owns the wording.
Genuinely custom (non-$ref) response bodies are left intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Strings convention: never hand-author Curl or CLI v2 samples. Mintlify
renders the request sample (curl + the multi-language playground) and the
response from the OpenAPI operation itself, so a hand-written x-code-samples
block drifts and overrides the correct auto-generated one; a CLI v2 sample
is not spec-derivable at all. Remove the block so Mintlify renders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
"$ref": "../../responses.yaml#/422"
"429":
"$ref": "../../responses.yaml#/429"
x-code-samples:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment to before. this is automatically rendered by mintlify and removes the duplication. see this PR for reference: https://github.com/Phrase-Engineering/strings-app/pull/17973

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to discuss this with the team, I don't think that was a good approach. I think we should keep strings-specific examples, just not sure whether they should be generated along with the clients, using AI, or manually as before.

New strings rubric rule: Mintlify auto-generates the request curl, so a
hand-written Curl sample is redundant and overrides it, but a CLI v2
sample cannot be derived from the spec and must be preserved. This PR
originally removed the whole x-code-samples block; restore the CLI v2
entry (Curl stays dropped). compiled.json regenerated via make bundle.
responses:
"204":
"$ref": "../../responses.yaml#/204"
description: The key was successfully detached from the Figma attachment. No content is returned.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm is there content returned or not? there's the content section below

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

head(:no_content)

responses:
"204":
"$ref": "../../responses.yaml#/204"
description: The key was successfully detached from the Figma attachment. No content is returned.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

head(:no_content)

Comment thread paths/figma_attachment_keys/destroy.yaml Outdated
Comment thread doc/compiled.json Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer-hub-api-quality API doc quality fix from the API Grader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants