Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): dont fail hard on integer based enums #5768

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

dsinghvi
Copy link
Member

Description

The OpenAPI parser assumed that enums would alwyas be strings but now handles cases with integers.

Changes Made

  • openapi-types types schema.enum as any[] which made this impossible to detect
  • check if the enum is a string and then convert to a fern enum
  • otherwise bring in as an alias b/c fern definitions dont support integer enuyms

Testing

  • Unit tests added/updated
  • Manual testing completed

@dsinghvi dsinghvi marked this pull request as ready for review January 27, 2025 15:31
@dsinghvi dsinghvi merged commit cd3d9e5 into main Jan 27, 2025
51 checks passed
@dsinghvi dsinghvi deleted the dsinghvi/parse-integer-based-enums branch January 27, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant