Context
Two source-schema patterns leak into the TypeScript SDK's public type surface as awkward, typo-feeling names. Both originate in schemas/cache/{version}/ and propagate through json-schema-to-typescript into @adcp/client's core.generated.ts and (via adcp-client#938 / #931) into the public Values exports.
Tracked SDK-side in adcp-client#942.
1. SCREAMING_SNAKE parent names
A discriminator branch with code: \"RATE_LIMITED\" and no explicit title lands as RATE_LIMITEDDetails in the generated TypeScript. PR #938 then propagates it as RATE_LIMITEDDetails_ScopeValues. Reads as a typo to every consumer.
2. Numbered-dupe suffixes from re-referenced enums
When the same enum is reachable through two different schema paths without a shared $ref, json-schema-to-typescript emits both copies as Foo and Foo1. Currently visible: AgeVerificationMethod + AgeVerificationMethod1, plus BriefAsset1, VASTAsset1, DAASTAsset1, CatalogAsset1. Both copies always have identical literal values — the suffix implies a version/distinction that doesn't exist. Documented as a known codegen artifact in the SDK's auto-memory (project_jsts_numbered_dupes.md).
Suggested fix (upstream)
In schemas/cache/{version}/:
- Give the
RATE_LIMITED discriminator branch (and any siblings using SCREAMING_SNAKE codes) an explicit \"title\": \"RateLimitedDetails\" so json-schema-to-typescript produces RateLimitedDetails.
- For cross-referenced enums (
AgeVerificationMethod and the four *Asset1 cases), introduce a single shared $ref so the codegen emits one type. Eliminates the dedup-by-value problem at the source.
SDK-side fallback: rename in a post-codegen step, with aliases for one minor version. Adds codegen complexity; the spec is the authoritative place to express both fixes.
Acceptance
Refs
🤖 Filed by Claude Code
Context
Two source-schema patterns leak into the TypeScript SDK's public type surface as awkward, typo-feeling names. Both originate in
schemas/cache/{version}/and propagate throughjson-schema-to-typescriptinto@adcp/client'score.generated.tsand (via adcp-client#938 / #931) into the publicValuesexports.Tracked SDK-side in adcp-client#942.
1. SCREAMING_SNAKE parent names
A discriminator branch with
code: \"RATE_LIMITED\"and no explicittitlelands asRATE_LIMITEDDetailsin the generated TypeScript. PR #938 then propagates it asRATE_LIMITEDDetails_ScopeValues. Reads as a typo to every consumer.2. Numbered-dupe suffixes from re-referenced enums
When the same enum is reachable through two different schema paths without a shared
$ref,json-schema-to-typescriptemits both copies asFooandFoo1. Currently visible:AgeVerificationMethod+AgeVerificationMethod1, plusBriefAsset1,VASTAsset1,DAASTAsset1,CatalogAsset1. Both copies always have identical literal values — the suffix implies a version/distinction that doesn't exist. Documented as a known codegen artifact in the SDK's auto-memory (project_jsts_numbered_dupes.md).Suggested fix (upstream)
In
schemas/cache/{version}/:RATE_LIMITEDdiscriminator branch (and any siblings using SCREAMING_SNAKE codes) an explicit\"title\": \"RateLimitedDetails\"sojson-schema-to-typescriptproducesRateLimitedDetails.AgeVerificationMethodand the four*Asset1cases), introduce a single shared$refso the codegen emits one type. Eliminates the dedup-by-value problem at the source.SDK-side fallback: rename in a post-codegen step, with aliases for one minor version. Adds codegen complexity; the spec is the authoritative place to express both fixes.
Acceptance
RATE_LIMITEDDetails→RateLimitedDetails(or equivalent PascalCase) in the SDK'score.generated.tsafternpm run sync-schemasAgeVerificationMethod1,BriefAsset1,VASTAsset1,DAASTAsset1,CatalogAsset1consolidate into the un-suffixed namesValuesexports — released names with the suffixes get aliases for one minor versionRefs
🤖 Filed by Claude Code