Skip to content

Conversation

@psegalen
Copy link

@psegalen psegalen commented Jan 22, 2026

This PR just fixes the syntax of the generated code, no opinionated new code, no change of any nature to anything, just some syntax fix.
It fixes issue #22779

Fix is only about balancing unbalanced parentheses and using the correct variables, nothing else.

Again, as this doesn't change anything about anything already functional and being in a kind of a hurry, I haven't walked through the PR checklist, sorry.


Summary by cubic

Fixed TypeScript code generation for oneOf arrays so Date and DateTime arrays parse and serialize correctly. This corrects variable usage and missing parentheses in the template.

  • Bug Fixes
    • Use item (not json) in json.every and map.
    • Balance missing parentheses in if conditions and map calls.
    • Map to new Date(value) when parsing arrays; serialize Date arrays with toISOString().substring(0,10) and DateTime arrays with item.toISOString().

Written for commit 785ecb4. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

@psegalen psegalen changed the title Fixed TypeScript code generation for oneOf using arrays [BUG][TypeScript] Fixed TypeScript code generation for oneOf using arrays Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant