Skip to content

fix(API): improve post /icu/skeleton documentation#1187

Merged
Stephen Lumenta (sbl) merged 9 commits into
mainfrom
devex-117-icu-build-icu-skeletons-v2
Jul 1, 2026
Merged

fix(API): improve post /icu/skeleton documentation#1187
Stephen Lumenta (sbl) merged 9 commits into
mainfrom
devex-117-icu-build-icu-skeletons-v2

Conversation

@sbl

Copy link
Copy Markdown
Contributor

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

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.
@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.

8 changes: 1 error, 0 warning, 7 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

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	[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

Copy link
Copy Markdown
Contributor Author

This PR replaces #1174, which was closed after jablan's review.

Feedback addressed from #1174:

Comment Status
"Moving existing sections around makes reviewing harder" ✅ Fixed

What changed: requestBody was placed at the bottom of the file in #1174 (after x-code-samples). This PR puts it back between parameters and responses — the standard OpenAPI order — and leaves all other section ordering untouched. Only the fields required by the failing rubric dimensions are modified.

🤖 Generated with Claude Code

@sbl Stephen Lumenta (sbl) changed the title feat(API): improve post /icu/skeleton documentation fix(API): improve post /icu/skeleton documentation Jun 17, 2026
Comment thread paths/icu/skeleton.yaml Outdated
Comment thread paths/icu/skeleton.yaml
Stephen Lumenta (sbl) and others added 4 commits June 17, 2026 20:52
- 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>
@sbl

Copy link
Copy Markdown
Contributor Author

API surface change — reviewer note

This PR constrains cldr_version on POST /icu/skeleton to enum: [legacy, cldr_41] — the only values the prior description already declared valid. oasdiff flags this as request-property-became-enum. No change to live API behavior; the enum encodes the documented contract.

Applying breaking-change-approved to clear the gate.

Blocker (not cleared by the label): this enum addition currently breaks the TypeScript client build (jest check):
src/models/IcuSkeletonParameters.ts: error TS2304: Cannot find name 'IcuSkeletonParametersCldrVersionEnum'.
The generator references the enum type but does not emit it. This must be resolved before merge (e.g. give the enum a named schema, or drop the enum and keep the allowed values in prose).

@sbl Stephen Lumenta (sbl) added the breaking-change-approved Skip the oasdiff breaking-change gate: this PR intentionally changes the API surface label Jun 24, 2026
Stephen Lumenta (sbl) and others added 4 commits June 25, 2026 12:20
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.
@sbl Stephen Lumenta (sbl) merged commit 1bbf2dc into main Jul 1, 2026
12 of 13 checks passed
@sbl Stephen Lumenta (sbl) deleted the devex-117-icu-build-icu-skeletons-v2 branch July 1, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change-approved Skip the oasdiff breaking-change gate: this PR intentionally changes the API surface 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