-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Refactor code generation templates and enhance test coverage #5293
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
base: master
Are you sure you want to change the base?
Conversation
|
@RicoSuter, I noticed some tests override the .verified.txt file instead of generating a .received.txt file and comparing it in NSwag.CodeGeneration.CSharp.Tests.csproj. Is that intended? |
1b9792b to
0f33b04
Compare
It's for easier development, so you will see the changes when proposing a PR. Can't remember but this probably should only happen in development. |
89b241f to
73c4043
Compare
I don't like it. How can I change it? |
I believe the switch is here: https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.CodeGeneration.Tests/VerifyHelper.cs#L44 |
a4330d4 to
001581a
Compare
7588b31 to
1102b8c
Compare
2006ab5 to
40ff6e5
Compare
- Added `CSharpCompiler.AssertCompile` assertions across multiple test files to ensure generated code compiles successfully. - Introduced new test cases for nullable path parameters, query string handling (arrays, dictionaries, deep objects), and OpenAPI specifications. - Refactored path and query parameter handling in Liquid templates for improved readability and correctness. - Generated auto-verified test outputs for new test cases. - Improved handling of constructor parameters in generated clients.
40ff6e5 to
15e4fab
Compare
|
Hi @RicoSuter, All tests passed! |
Refactor code generation templates and enhance test coverage.
CSharpCompiler.AssertCompileassertions across multiple test files to ensure generated code compiles successfully.Addresses #5260 #4587 #5096