-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update to fix Lists/Arrays of nullables not getting marked as nullable #3364
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3364 +/- ##
==========================================
- Coverage 84.74% 83.47% -1.28%
==========================================
Files 84 84
Lines 3278 3280 +2
Branches 571 572 +1
==========================================
- Hits 2778 2738 -40
- Misses 500 542 +42
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor comments.
src/Swashbuckle.AspNetCore.SwaggerGen/SchemaGenerator/SchemaGenerator.cs
Outdated
Show resolved
Hide resolved
...Swashbuckle.AspNetCore.SwaggerGen.Test/SchemaGenerator/JsonSerializerSchemaGeneratorTests.cs
Show resolved
Hide resolved
…nerator.cs Co-authored-by: Martin Costello <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
356c595
into
domaindrivendev:master
Pull Request
The issue or feature being addressed
This Pull Request should hopefully address an issue where Arrays/Lists of Nullable types where not getting correctly marked as Nullable in the generated swagger.
Resolves #3284
Details on the issue fix or feature implementation
In GenerateSchema -> GenerateSchemaForType I added a check to see if the Array underlying type was nullable. If so, it would mark the corresponding section in the schema (in this case items) with nullable = true.