fix(API): extract cldr_version enum to fix TypeScript client build - #1223
Merged
Franca Winter (francawinter) merged 4 commits intoJul 23, 2026
Merged
Conversation
The typescript-fetch generator fails to emit the enum declaration for inline string enums inside schemas that also use oneOf. This causes a compile error in the generated client: src/models/IcuSkeletonParameters.ts: Cannot find name 'IcuSkeletonParametersCldrVersionEnum' Fix: extract cldr_version to a named component schema (icu_skeleton_cldr_version). The generator handles named schemas correctly. Enum values are unchanged so this is not a breaking change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
API changelog (oasdiff)Doc-only edits (descriptions, examples) do not appear here. |
Franca Winter (francawinter)
added a commit
that referenced
this pull request
Jul 23, 2026
The TypeScript generator fix for the icu/skeleton endpoint is unrelated to the format annotations endpoint. Extracted to its own PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| type: string | ||
| description: >- | ||
| Pluralization rule set to apply when constructing skeletons. | ||
| Accepted values are `legacy` and `cldr_41`. Defaults to |
Contributor
There was a problem hiding this comment.
not sure whether that's correct that only cldr 41 and legacy are accepted
The enum was wrong (cldr_41 should be cldr41) and would go stale with every CLDR release. Drop it in favour of a description that names legacy and cldr48 as representative values without pinning an exhaustive list. Update example to cldr48 (current default). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The typescript-fetch generator fails to emit the enum declaration for inline string enums inside schemas that also use oneOf, causing a compile error in the generated TypeScript client. Removing the enum fixes the build. Description and example updated to reflect the actual accepted values. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sönke Behrendt (theSoenke)
approved these changes
Jul 23, 2026
Franca Winter (francawinter)
marked this pull request as ready for review
July 23, 2026 11:55
Franca Winter (francawinter)
deleted the
claude/fix-icu-cldr-version-typescript
branch
July 23, 2026 11:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Removed the
enumconstraint fromcldr_versionin thePOST /icu/skeletonrequest body.Why
The
typescript-fetchgenerator has a bug: inline string enums inside schemas that also useoneOfemit a property type reference without the matching enum declaration, causing a TypeScript compile error in the generated client:Removing the enum fixes the build. The description and example are updated to reflect the actual accepted values (
legacyor a CLDR version string such ascldr48).Steps to verify
CI
jest/ Run Typescript Tests should pass.