Add CreateFromJson options overload#3218
Add CreateFromJson options overload#3218martincostello merged 1 commit intodomaindrivendev:masterfrom
Conversation
- Add overload to `OpenApiAnyFactory.CreateFromJson()` that supports passing in a `JsonSerializerOptions` as a workaround for domaindrivendev#3217. - Use concrete types as suggested by analyzers. - Move unshipped APIs to shipped. - Bump version to 7.3.0.
There was a problem hiding this comment.
Copilot reviewed 1 out of 8 changed files in this pull request and generated 1 comment.
Files not reviewed (7)
- Directory.Build.props: Language not supported
- src/Swashbuckle.AspNetCore.ReDoc/PublicAPI/PublicAPI.Shipped.txt: Language not supported
- src/Swashbuckle.AspNetCore.ReDoc/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
- src/Swashbuckle.AspNetCore.SwaggerGen/PublicAPI/PublicAPI.Shipped.txt: Language not supported
- src/Swashbuckle.AspNetCore.SwaggerGen/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
- src/Swashbuckle.AspNetCore.SwaggerUI/PublicAPI/PublicAPI.Shipped.txt: Language not supported
- src/Swashbuckle.AspNetCore.SwaggerUI/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
Comments suppressed due to low confidence (1)
src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/OpenApiAnyFactory.cs:47
- [nitpick] The error message could be more descriptive. Consider providing additional context or guidance on what went wrong.
throw new System.ArgumentException($"Unsupported value kind {jsonElement.ValueKind}");
src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/OpenApiAnyFactory.cs
Show resolved
Hide resolved
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3218 +/- ##
=======================================
Coverage 83.65% 83.65%
=======================================
Files 76 76
Lines 3175 3176 +1
Branches 536 536
=======================================
+ Hits 2656 2657 +1
Misses 519 519
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
OpenApiAnyFactory.CreateFromJson()that supports passing in aJsonSerializerOptionsas a workaround for [Bug]: All enum values show up as "null" when using JSON Source Generation #3217 (see [Bug]: All enum values show up as "null" when using JSON Source Generation #3217 (comment)).Tested it unblocks #3217 manually.