fix(API): improve post /icu/skeleton documentation#1187
Conversation
Sharper description explaining what ICU skeletons are and when to use the endpoint. Adds full parameter docs with descriptions and examples, promotes the requestBody schema to oneOf to document the content/id mutual-exclusion contract, documents all error responses (400, 401, 403, 404, 422, 429) with actionable remediation text, and updates the code samples to show realistic locale pairs and expected output. Resolves DEVEX-117.
API changelog (oasdiff)Doc-only edits (descriptions, examples) do not appear here. |
|
This PR replaces #1174, which was closed after jablan's review. Feedback addressed from #1174:
What changed: 🤖 Generated with Claude Code |
- Dedupe the requestBody schema: hoist the six shared properties to the top level and keep oneOf only to express the content-xor-id constraint (was repeating all six property definitions in both oneOf branches). - Drop the 'Example response' trailer from the curl and CLI v2 samples; the 200 example is already documented on the response, and no other endpoint inlines a response in its code sample. 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>
API surface change — reviewer noteThis PR constrains Applying Blocker (not cleared by the label): this enum addition currently breaks the TypeScript client build ( |
The 200 response already references `schemas/icu.yaml#/skeleton`, which carries a
schema-level example. The inline override duplicated it and also filled in plural
content (`one {One item}`), which is not a skeleton — the schema's empty-braces
form is the correct skeleton representation. Remove the inline example so the
response renders the canonical schema example.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerated from source with `swagger-cli bundle -t json -w 300 main.yaml` (the exact command the lint/compare-output CI job runs), so the committed bundle matches a fresh bundle of the deduped YAML. Fixes the compare-output failure introduced by editing the source without rebundling. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Improves the documentation for
post /icu/skeleton: 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.
Closes DEVEX-117.
🤖 Generated with Claude Code