diff --git a/CHANGELOG.md b/CHANGELOG.md index ba23119..20c86a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ These are the changes to each version that has been released on the [nuget](https://www.nuget.org/packages/Unchase.Swashbuckle.AspNetCore.Extensions/). +## v2.6.9 `2021-08-30` + +- [x] Fix NRE in `InheritDocRequestBodyFilter` and `InheritDocParameterFilter` + ## v2.6.8 `2021-08-26` - [x] Add `IncludeXmlCommentsWithRemarks` improvements diff --git a/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocParameterFilter.cs b/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocParameterFilter.cs index efe8296..160eae5 100644 --- a/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocParameterFilter.cs +++ b/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocParameterFilter.cs @@ -66,7 +66,7 @@ public InheritDocParameterFilter(List documents, Dictionary. public void Apply(OpenApiParameter parameter, ParameterFilterContext context) { - if (context.ApiParameterDescription.PropertyInfo() == null) + if (context.ApiParameterDescription?.PropertyInfo() == null) { return; } diff --git a/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocRequestBodyFilter.cs b/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocRequestBodyFilter.cs index c92aee9..8223a38 100644 --- a/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocRequestBodyFilter.cs +++ b/src/Unchase.Swashbuckle.AspNetCore.Extensions/Filters/InheritDocRequestBodyFilter.cs @@ -61,25 +61,38 @@ public InheritDocRequestBodyFilter(List documents, Dictionary p.Name.Equals(entry.Key, StringComparison.OrdinalIgnoreCase)); if (memberInfo != null) diff --git a/src/Unchase.Swashbuckle.AspNetCore.Extensions/Unchase.Swashbuckle.AspNetCore.Extensions.csproj b/src/Unchase.Swashbuckle.AspNetCore.Extensions/Unchase.Swashbuckle.AspNetCore.Extensions.csproj index f82b40c..13af05d 100644 --- a/src/Unchase.Swashbuckle.AspNetCore.Extensions/Unchase.Swashbuckle.AspNetCore.Extensions.csproj +++ b/src/Unchase.Swashbuckle.AspNetCore.Extensions/Unchase.Swashbuckle.AspNetCore.Extensions.csproj @@ -14,9 +14,9 @@ 7.3 https://github.com/unchase/Unchase.Swashbuckle.AspNetCore.Extensions/blob/master/assets/icon.png?raw=true - 2.6.8 - 2.6.8.0 - 2.6.8.0 + 2.6.9 + 2.6.9.0 + 2.6.9.0 false Unchase.Swashbuckle.AspNetCore.Extensions.xml