Unchase.Swashbuckle.AspNetCore.Extensions
Unchase.Swashbuckle.AspNetCore.Extensions copied to clipboard
Swashbuckle.AspNetCore 6.9.0, fix for inheritdocs
Related to #38
- Upped NuGets (bug is only observable in newest Swashbuckle's releases).
- Added stinking reflection for acquiring private field
XmlCommentsSchemaFilter._xmlDocMembers. Don't know a better way w/o proposing modifications in Swashbuckle's API. If its broken in the next Swashbuckle release, thenNotSupportedExceptionwill throw. XPathDocumenttries to load again for each xml file from theBaseURI(usually itsfile:///).- If
SwaggerGenOptions.IncludeXmlCommentsis called withstring filePathor() => new XPathDocument(uri), then all is ok. - But if user calls something like
new XPathDocument(new StringReader(File.ReadAllText(filePath)))- it's bad, no inheritdocs will be resolved from that file.
- If
- Because of the last one, fixed NRE in
InheritDocOperationFilter, so that swagger will not fail although displaying non-resolved inheritdocs.
Got some problem with CI, sdk version maybe...
Build.ps1 fails when in folder src\Unchase.Swashbuckle.AspNetCore.Extensions it calls:
dotnet pack -c Release -o ..\..\artifacts
locally I get ok-ish build with warnings, and nupkg artifact is ok:
Determining projects to restore...
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\8.0.403\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): warning NU
5048: The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Le
arn more at https://aka.ms/deprecateIconUrl [C:\Projects\Unchase.Swashbuckle.AspNetCore.Extensions\src\Unchase.Swashbuc
kle.AspNetCore.Extensions\Unchase.Swashbuckle.AspNetCore.Extensions.csproj]
The package Unchase.Swashbuckle.AspNetCore.Extensions.2.7.1 is missing a readme. Go to https://aka.ms/nuget/authoring
-best-practices/readme to learn why package readmes are important.
Successfully created package 'C:\Projects\Unchase.Swashbuckle.AspNetCore.Extensions\artifacts\Unchase.Swashbuckle.Asp
NetCore.Extensions.2.7.1.nupkg'.
CI shows this:
Determining projects to restore...
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\8.0.401\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5):
error NU5026: The file 'C:\projects\unchase-swashbuckle-aspnetcore-extensions\src\
Unchase.Swashbuckle.AspNetCore.Extensions\bin\Any CPU\Release\netstandard2.0\
Unchase.Swashbuckle.AspNetCore.Extensions.dll' to be packed was not found on disk.
[C:\projects\unchase-swashbuckle-aspnetcore-extensions\src\Unchase.Swashbuckle.AspNetCore.Extensions\Unchase.Swashbuckle.AspNetCore.Extensions.csproj]
It tries to find dll in bin\Any CPU\Release\netstandard2.0, but it is actually in bin\Release\netstandard2.0
Thank you @alser for providing the PR. I had to make manual edits due to a broken CI/CD from AppVeyor.