-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fixed operation name generation names when it has illegal symbols #283
Conversation
…ectory by default
added Trim because of internal feeling of beauty))) it covers case when we have _ symbol either at the end or start of identifier, e.g. IAppClient10_ -> IAppClient10
@yadanilov19 Thanks for taking the time to implement this. The changes look good to me. Let's get this in as soon as all the PR verifications checks pass |
@all-contributors please add @yadanilov19 for code |
I've put up a pull request to add @yadanilov19! 🎉 |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #283 +/- ##
==========================================
- Coverage 97.46% 97.39% -0.07%
==========================================
Files 60 63 +3
Lines 2131 2344 +213
==========================================
+ Hits 2077 2283 +206
- Misses 37 40 +3
- Partials 17 21 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I've made some improvements, but it does do the same) |
@yadanilov19 No problem. Keep them coming as you see fit! Give me a heads-up when you think you're done and I'll give it another review so we can get the changes in |
@yadanilov19 The unit tests seem to be failing |
yeah, I see |
|
I guess I'am done. |
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.
Excellent work @yadanilov19
When will a new release be? |
@yadanilov19 Today. I run a larger set of regression tests before a release, so as soon as this is done running, I will publish a release build to nuget.org |
@yadanilov19 new release: v0.9.4 available from nuget.org |
Hi!
I faced a compilation problem when the service's swagger didn't have the operationId field in the definition of action and the path had some illegal symbols at the end of it.
For example, the dollar symbol
/pet/$illegal-action
. Refitter will generate operationName = $iilega-action, which cannot be compiled.I decided to fix that problem just by using the existing extension method
IdentifierUtils.Sanitize
that already uses for creation interface name.I also expanded the Sanitize method to cover more symbols than before.
I hope it will help improve quality of this cool tool!