Fix nullExamples#3803
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3803 +/- ##
==========================================
- Coverage 94.93% 94.92% -0.01%
==========================================
Files 111 111
Lines 3886 3885 -1
Branches 784 783 -1
==========================================
- Hits 3689 3688 -1
Misses 197 197
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:
|
|
@martincostello could you review this?, I think that there is an extra property that is the format that is right now no neccesary but I did at the first implementation needed(I could remove it by the wat) |
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsExampleHelper.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: dldl-cmd <76129819+dldl-cmd@users.noreply.github.com>
I see all issues, PRs and comments in this repo - I get to stuff when it fits into my day and my TODO/priority list 😃 |
Co-authored-by: dldl-cmd <76129819+dldl-cmd@users.noreply.github.com>
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsExampleHelper.cs
Outdated
Show resolved
Hide resolved
martincostello
left a comment
There was a problem hiding this comment.
FYI I'm going to be away next week, so even if this PR is approved/merged today, any new version won't ship until after I'm back as this is already the third attempt at resolving the underlying issue and I don't want a fourth attempt looming while I'm away 😄
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsExampleHelper.cs
Outdated
Show resolved
Hide resolved
...Endpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsExampleHelperTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/Fixtures/XmlAnnotatedType.cs
Outdated
Show resolved
Hide resolved
martincostello
left a comment
There was a problem hiding this comment.
Could we add an integration test for this too?
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsExampleHelper.cs
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsSchemaFilterTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Martin Costello <martin@martincostello.com>
|
Once there's some user feedback that this looks right (just to avoid too many releases trying to fix this bug) then can look at merging. Seems reasonable to me. |
Fixes #3801.
As previously the null was being always serialized and also keep compatibility with not nullable references
As the integer/double could be always have the nullableReference because the objects where int?,double? for old versions seems fine.
I also tought about the object case, that for projects that do not have the nullable references enabled seems OK to me to have that case and also for the case of strings.. I do not really know if I should also place an specific case for arrays