Skip to content

Conversation

@winrid
Copy link
Contributor

@winrid winrid commented Jan 9, 2026

Fixes #22640
Fixes #22641

  • Nested map support. (Table[string, Table[string, string]])
  • Negative enum support (where abs value of ordinal clashed with other value).

Summary by cubic

Adds nested map support and fixes enum handling for negative numeric values in the Nim client codegen to generate correct types and valid enum names. Fixes #22640 and #22641.

  • Bug Fixes
    • Resolve $ref in getTypeDeclaration to detect nested maps/arrays and emit correct Table[...] types.
    • Detect numeric enums from integer/number schemas and prefix negative values with "Neg" to avoid identifier collisions.
    • Update petstore fixtures and generated Nim models (DigestEmailFrequency, PetStatistics) to cover these cases.

Written for commit c81ac9e. Summary will update on new commits.

Also includes a fix for enums :)
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 6 files

@winrid
Copy link
Contributor Author

winrid commented Jan 9, 2026

@hokamoto would you be so kind as to review?

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.

[BUG] [Nim] Enums With Negative Values Broken [BUG] [Nim] Nested Map Support Broken

1 participant