Commit ed88a1b
authored
Validate OpenAPI documents create valid C# clients (#3686)
* Add code generation integration tests
Initial infrastructure for integration tests that validate OpenAPI documents can generate valid C# clients using Kiota and NSwag.
* Refactor client generator code
Move to its own class to slim down the test.
* Extend Pet Store test cases
Add test cases for Swagger 2.0 and YAML, where relevant.
* Generate clients from snapshots
Generate client code from snapshot files and running applications instead of Pet Store.
* Enable nullable
Enable nullable annotations in the generated client code.
* Deduplicate tests
Just validate the snapshots, not the applications as well (which are used to generate the snapshots).
* Refactor switch statement
Refactor to make the lines less long.1 parent 0e042af commit ed88a1b
7 files changed
Lines changed: 475 additions & 0 deletions
File tree
- .config
- .github/workflows
- test/Swashbuckle.AspNetCore.IntegrationTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
0 commit comments