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

feat: add optional configuration parameter to generate native Typescript enums #1058

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

dsthode
Copy link
Contributor

@dsthode dsthode commented Nov 19, 2023

Status

READY

Description

Fix #907

As requested in issue #907 this PR adds a new optional configuration parameter to generate native Typescript enums.

The new parameter useNativeEnums is set in the output.override configuration block and when set to true (defaults to false) Orval will generate a native Typescript enum instead of the type and const combo.

@melloware melloware added this to the 6.21.0 milestone Nov 19, 2023
@melloware melloware added the enhancement New feature or request label Nov 19, 2023
@melloware
Copy link
Collaborator

Thanks letting the build run now!

@melloware melloware merged commit 76efc85 into orval-labs:master Nov 20, 2023
2 checks passed
@DiRover
Copy link

DiRover commented Nov 23, 2023

@melloware Hi, please tell, when you will make a release with these changes? very necessary)

@melloware
Copy link
Collaborator

@anymaniax handles releases I pinged him.

@melloware
Copy link
Collaborator

@DiRover 6.21.0 is out if you want to try this now.

@DiRover
Copy link

DiRover commented Nov 29, 2023

@melloware thx! It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate enum instead of type + const
3 participants