-
-
Notifications
You must be signed in to change notification settings - Fork 470
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: replace special characters using SPECIAL_CHARACTER_MAP
for dup…
#1877
Conversation
🦋 Changeset detectedLatest commit: fdba84e 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 |
4a0f7c4
to
3f679a6
Compare
…licate-identifiers
3f679a6
to
1e2e1c2
Compare
This issue #1874 is related to the PR #1761 I previously submitted so Thank you @phk422 for working on this issue! 🙏
|
Thank you for your suggestion, I also thought about adding all characters, but I think it will have some impact on the type generation of existing users. Considering the probability of #1874 appearing in the actual use process is relatively small, so I think to solve specific problems; As for the solution with quotation marks, although it seems simpler for this problem, it will also have a big impact on the use of our current users (personally, I don't like the style of quotation marks, haha...) . Above, I'd also like to hear from @drwpow |
This is a great fix, thank you! Please add a |
Agreed with @phk422; enum collision is something that can be done incrementally, and with a light touch at first. We shouldn’t risk changing generated types if at all possible, too (not without a valid usecase). We don’t have to handle all possible scenarios, just so long as we are handling collision at a basic level. I don’t have specific data on this, but just anecdotally, schema collision does happen in large schemas split between multiple files. But like @phk422 said it’s pretty rare for there to be more than a conflict or two (if there is at all). So I’d prefer to take approaches like this PR does—just add one usecase at a time, only when we’ve confirmed it’s a common-enough scenario that someone has run into it. |
428f663
to
f0dd6ff
Compare
f0dd6ff
to
7b05a55
Compare
c2a2014
to
fdba84e
Compare
…licate-identifiers
Changes
reference: #1874
How to Review
All test cases should pass
Checklist
docs/
updated (if necessary)pnpm run update:examples
run (only applicable for openapi-typescript)