Commit e11a233
Fix unexpected additional parameter validation in model factory (#53465)
* Initial plan
* Fix ArgumentNullException in model factory methods
Remove incorrect ArgumentNullException XML documentation from model factory methods.
Model factory methods are designed for mocking and should allow all parameters to be null.
The implementation handles null parameters gracefully using ternary operators.
Co-authored-by: live1206 <[email protected]>
* Update eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/ModelFactoryVisitor.cs
Co-authored-by: Copilot <[email protected]>
* Use Array.Empty instead of Enumerable.Empty to fix build issue
Co-authored-by: live1206 <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: live1206 <[email protected]>
Co-authored-by: Wei Hu <[email protected]>
Co-authored-by: Copilot <[email protected]>1 parent 756cbdd commit e11a233
File tree
2 files changed
+18
-8
lines changed- eng/packages/http-client-csharp-mgmt/generator
- Azure.Generator.Management/src/Visitors
- TestProjects/Local/Mgmt-TypeSpec/src/Generated
2 files changed
+18
-8
lines changedLines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
30 | 48 | | |
31 | 49 | | |
Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments