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?

@wing328
Copy link
Member

wing328 commented Jan 12, 2026

tested locally and the result is good.

let's give it a try

thanks again for the contribution.

@wing328 wing328 merged commit dff00c8 into OpenAPITools:master Jan 12, 2026
16 checks passed
@wing328 wing328 added this to the 7.19.0 milestone Jan 12, 2026
@winrid winrid deleted the nim-nested-map branch January 13, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

2 participants