-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[csharp] massively improve csharp templates code #16990
Conversation
improved apiclient.mus to keep it dry, sharing a single exec with Action<> delegate. improved api.mus to keep it dry, used chain constructors, kept RequestOptions in a single method, set configuration with alias directive moved fqn types to using directive for cleaner code removed 'this' from variables/props that are redundant
Added issue #16989 according to contributing readme. |
thanks for the PR. can you please update the tests (java unit tests) as well?
ref: https://circleci.com/gh/OpenAPITools/openapi-generator/81692 |
Sure, I can give a go, which IDE do you use? |
Improve api.mustache template without more DRY methods
All done, test now run OK |
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors. Let me know if you need help fixing it. |
Thanks for the heads up, I think it's working. I just added a secondary email. Btw the failing check is on the samples, it simply says: Should I run that sh locally and commit the result? Or is it something else? |
can you please update the samples when you've time? https://github.com/OpenAPITools/openapi-generator/actions/runs/6799047830/job/18529721203?pr=16990 update: done via b510aff |
i've merged the latest master into your branch and filed #17097. Some CI tests (C# related) failed. Can you please take a look when you've time? |
…napi-generator into charp-templates # Conflicts: # samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FormatTest.cs # samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs # samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs # samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs
Hi, I've regenerated the samples and everything seems to be ok, can you resolve the conflicts? |
please merge latest master into your branch and regenerate the samples to resolve the merge conflicts i'll try to put other c# related PRs on hold for the time being. |
Hi, terribly sorry, it completely slipped my mind, because of the holidays starting. I did the pull and merge, there are no conflitcs as of now. |
can you pls update the samples when you've time? https://github.com/OpenAPITools/openapi-generator/actions/runs/7685681970/job/20945052863?pr=16990 |
your last commit includes changes to lots of files not originally included in this PR (likely the rebase wasn't done correctly) can you please PM me via Slack so that I can help you out? https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g |
Hi (after a lot of time, sorry) so the rebase was getting pretty difficult at the time. |
Improved apiclient.mus to keep it dry, sharing a single exec with Action<> delegate.
Improved api.mus to keep it dry, used chain constructors, kept RequestOptions in a single method, set configuration POCO with alias directive and moved fqn types to using directive for cleaner code.
Removed 'this' from variables/props that are redundant.
Fixed incompatible framework, System.Web, used on .NET 6.0 and above.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming 7.1.0 minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)@mandrean @shibayan @Blackclaws @lucamazzanti @iBicha