fix(SchemaGenerator): exclude inherited properties only when base add…#3692
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3692 +/- ##
=======================================
Coverage 94.66% 94.66%
=======================================
Files 111 111
Lines 3858 3859 +1
Branches 778 778
=======================================
+ Hits 3652 3653 +1
Misses 206 206
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:
|
|
Could you also add a test somewhere in the existing integration test project that would produce outputs in a snapshot file please? It's much easier to verify the behaviour in those kinds of tests where the rendered OpenAPI document is visible. |
|
@martincostello Attempted a snapshot test, let me know if that looks as you expect! |
7074294 to
cd12095
Compare
...chema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.DotNet10_0.verified.txt
Show resolved
Hide resolved
martincostello
left a comment
There was a problem hiding this comment.
Just one suggestion for another test, but otherwise seems OK to me.
...Swashbuckle.AspNetCore.SwaggerGen.Test/SchemaGenerator/JsonSerializerSchemaGeneratorTests.cs
Show resolved
Hide resolved
…itance, which reveals a problem fixing in next commit
… are to be included in the output schema
|
Thanks! |
- Rename classes from #3692 for clarity. - Some style refactoring.
- Rename classes from #3692 for clarity. - Some style refactoring.
fix(SchemaGenerator): exclude inherited properties only when base added to AllOf
resolves #3201
I've outlined the theory for this change in this comment: #3201 (comment)