-
-
Notifications
You must be signed in to change notification settings - Fork 528
fix: Enum option cannot generate enums if values are not valid property names #1761
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
Conversation
… replace only the invalid characters with "_" if they are part of the name
🦋 Changeset detectedLatest commit: 59c6033 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great fix, thank you! However this needs a Changeset to generate a release. See the Changeset comment for instructions on how to make a patch
change for openapi-typescript
.
Thank you for the review! I have added the changeset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…ty names (openapi-ts#1761) * chore(test): add InvalidPropertyNameChars with enum flag * fix: Quote the name if it consists entirely of invalid characters and replace only the invalid characters with "_" if they are part of the name * chore: fix lint error * chore: add changeset patch md
Changes
#1722
Made the following changes:
The existing logic that replaces invalid characters within a key name with "_" has been kept. Additionally, by quoting the name when it consists entirely of invalid characters, it helps prevent errors.
How to Review
Ensure that the test passes.
Checklist
docs/
updated (if necessary)pnpm run update:examples
run (only applicable for openapi-typescript)