-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(SchemaGenerator): exclude inherited properties only when base add… #3692
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)