Skip to content

Commit

Permalink
Fix #13
Browse files Browse the repository at this point in the history
Fix #14
  • Loading branch information
unchase committed Jul 29, 2020
1 parent a3d1193 commit a4ee18d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

These are the changes to each version that has been released on the [nuget](https://www.nuget.org/packages/Unchase.Swashbuckle.AspNetCore.Extensions/).

## v2.3.9 `(2020-07-11)`
## v2.3.10 `(2020-07-29)`

- [x] Fix [issue #13](https://github.com/unchase/Unchase.Swashbuckle.AspNetCore.Extensions/issues/13)
- [x] Fix [issue #14](https://github.com/unchase/Unchase.Swashbuckle.AspNetCore.Extensions/issues/14)

## v2.3.9 `(2020-07-28)`

- [x] Update nuget dependencies for sample WebAPI
- [x] Fix [issue #12](https://github.com/unchase/Unchase.Swashbuckle.AspNetCore.Extensions/issues/12)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public void ConfigureServices(IServiceCollection services)
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });

// use it if you want to hide Paths and Definitions from OpenApi documentation correctly
options.UseAllOfToExtendReferenceSchemas();

// if you want to add xml comments into the swagger documentation, first of all add:
var xmlFilePath = Path.Combine(AppContext.BaseDirectory, "WebApi3.1-Swashbuckle.xml");
options.IncludeXmlComments(xmlFilePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ private static string TryGetMemberComments(MemberInfo memberInfo, IEnumerable<XP
var xpathNavigator1 = xmlNavigator.SelectSingleNode(
$"/doc/members/member[@name='{nodeNameForMember}']");
var xpathNavigator2 = xpathNavigator1?.SelectSingleNode("summary");
return xpathNavigator2 != null ? XmlCommentsTextHelper.Humanize(xpathNavigator2.InnerXml) : string.Empty;
if (xpathNavigator2 != null)
{
return XmlCommentsTextHelper.Humanize(xpathNavigator2.InnerXml);
}
}

return string.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<NeutralLanguage></NeutralLanguage>
<LangVersion>7.3</LangVersion>
<PackageIconUrl>https://github.com/unchase/Unchase.Swashbuckle.AspNetCore.Extensions/blob/master/assets/icon.png?raw=true</PackageIconUrl>
<Version>2.3.9</Version>
<AssemblyVersion>2.3.9.0</AssemblyVersion>
<FileVersion>2.3.9.0</FileVersion>
<Version>2.3.10</Version>
<AssemblyVersion>2.3.10.0</AssemblyVersion>
<FileVersion>2.3.10.0</FileVersion>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<DocumentationFile>Unchase.Swashbuckle.AspNetCore.Extensions.xml</DocumentationFile>
</PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions test/WebApi3.1-Swashbuckle/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public void ConfigureServices(IServiceCollection services)
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });

// use it if you want to hide Paths and Definitions from OpenApi documentation correctly
options.UseAllOfToExtendReferenceSchemas();

#region AddEnumsWithValuesFixFilters

// if you want to add xml comments into the swagger documentation, first of all add:
Expand Down

0 comments on commit a4ee18d

Please sign in to comment.