-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Optional EOL for XmlComments (#2947) #3255
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
Optional EOL for XmlComments (#2947) #3255
Conversation
Also, I see the possibility of adding configuration from SwaggerGeneratorOptions (with an additional field PrefferedXmlEol - Enum(CLRF, LF)), but I suppose that in this case it will be necessary to make XmlCommentsTextHelper DI service, with the name for example XmlCommentsTextHumanizer in order to be able to inject the generator options into it. |
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsTextHelper.cs
Outdated
Show resolved
Hide resolved
By default, it's based on operation system.
Fixed with your suggestions, if there is anything to add or to improve, I will be glad to fix it! |
src/Swashbuckle.AspNetCore.SwaggerGen/PublicAPI/PublicAPI.Shipped.txt
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsDocumentFilter.cs
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsDocumentFilter.cs
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsOperationFilter.cs
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsOperationFilter.cs
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsSchemaFilter.cs
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsSchemaFilter.cs
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsTextHelper.cs
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsTextHelper.cs
Outdated
Show resolved
Hide resolved
src/Swashbuckle.AspNetCore.SwaggerGen/XmlComments/XmlCommentsTextHelper.cs
Outdated
Show resolved
Hide resolved
- Omit extra variables - Add [ActivatorUtilitiesConstructor] - Move definitions to Unshipped - Restore legacy behavior of new lines
Fixed. Please check out the updates |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3255 +/- ##
==========================================
+ Coverage 83.64% 83.74% +0.09%
==========================================
Files 76 76
Lines 3185 3192 +7
Branches 540 553 +13
==========================================
+ Hits 2664 2673 +9
+ Misses 521 519 -2
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.
Thanks for your contribution!
Pull Request
The issue or feature being addressed
Fixes #2947
Details on the issue fix or feature implementation
Before version 6.6.2, OpenAPI file generation was identical for Linux and Windows, which allowed to correctly process files from different OS (including comparing them on CI), after the version, the carets in the text began to differ.
Example of how it was
{
“name": ‘SomeController’,
“description": “Some description.\r\n\n<br>\r\n\Some Parameter (para tag)\r\n\”
}
Example of what became
{
“name": ‘SomeController’,
“description": “Some description.\r\n[\r\n]|[\n]\r\n\Some Parameter (para tag)\r\n\”
}
That is, instead of
being identical when generated on different OS, different strings started to be generated.
The pool requester replaces the generation based on the EOL of the operating system with the EOL generation previously specified in this file (CLRF).