-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Apply only a SchemaFilter to create the Description on the SwaggerUi #2943
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
Apply only a SchemaFilter to create the Description on the SwaggerUi #2943
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2943 +/- ##
==========================================
+ Coverage 90.10% 90.13% +0.02%
==========================================
Files 72 72
Lines 2730 2736 +6
Branches 432 433 +1
==========================================
+ Hits 2460 2466 +6
Misses 270 270
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Are you able to add an integration test for this scenario too?
test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGenerator/SwaggerGeneratorTests.cs
Outdated
Show resolved
Hide resolved
Finally I gave up, because the Verify test was giving different response in the linux build |
|
Do you use an editor that supports EditorConfig? The .editorconfig and .gitattributes are both configured so that line endings shouldn't be an issue, unless I've misunderstood how it works. Alternatively, does it have a setting that allows us to tell it to ignore line ending differences? |
|
As soon as I insert the Verify again the build fails, I do not see why it failed now. |
.../SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt
Show resolved
Hide resolved
|
Could you rebase onto the latest changes please? I just merged #2950 which added a bunch of new verification tests and this change might impact them and need regenerating. |
This PR fixes #1685.
I do not know if it's a SwaggerUi Bug, because this PR only copies the Description that was obtained in the SchemaFilter to the Parameters section. If the description is not showed under every parameter of the operation then the SwaggerUi does not show it.
Anyway, the solution I gave in the issue is very simple, so if you do not see this addition a built in you can close the PR