Repository navigation
fix: generate named union types referenced by arrays - #263
Merged
Merged
Conversation
d-suvorov-vk-team
approved these changes
Oct 30, 2026
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.
Generating an array whose items reference a named definition with a
typearray or withoneOfbut no scalartypeexits withUnknown type of object. The type-string renderer already supports these unions, butgenerateObject()rejects them before it reaches that renderer.Route
oneOfand array-valuedtypedefinitions through the existing type-alias generation path before the scalar-type switch. Referenced branches keep their generated definitions and imports, and ordinary object definitions continue to produce interfaces.Added six generator regression cases covering
type[]with and withoutoneOf,oneOfwith and without a scalartype, referenced union branches, and ordinary object interfaces. The new failure cases were reproduced against the previous implementation before applying the fix.Validation:
yarn test— passed (includes Jest, TypeScript checks, ESLint, and formatting).yarn build— passed.tsc --noEmit --strict --skipLibCheck— passed.Package release and downstream dependency updates are outside this PR.