Skip to content

Commit

Permalink
Fix bug with missed required definitions in "HidePathsAndDefinitionsB…
Browse files Browse the repository at this point in the history
…yRolesDocumentFilter"
  • Loading branch information
unchase authored and Chebotov Nikolay committed Jul 6, 2020
1 parent 9629b29 commit bee21e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.7 `(2020-07-06)`

- [x] Fix bug with missed required definitions in `HidePathsAndDefinitionsByRolesDocumentFilter`

## v2.3.6 `(2020-07-06)`

- [x] Fix bug with OpenAPI operation RequestBody in `HidePathsAndDefinitionsByRolesDocumentFilter`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ private static List<string> GetRequiredDefinitions(IDictionary<string, OpenApiSc
result.Add(itemsSchemaProperty.Value?.Reference?.Id);
}

if (itemsSchemaProperty.Value?.Items?.Reference?.Id != null)
{
result.AddRange(GetRequiredDefinitions(schemas, itemsSchemaProperty.Value?.Items?.Reference));
}

if (itemsSchemaProperty.Value?.AllOf?.Count > 0)
{
foreach (var itemsSchemaPropertyAllOf in itemsSchemaProperty.Value?.AllOf)
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.6</Version>
<AssemblyVersion>2.3.6.0</AssemblyVersion>
<FileVersion>2.3.6.0</FileVersion>
<Version>2.3.7</Version>
<AssemblyVersion>2.3.7.0</AssemblyVersion>
<FileVersion>2.3.7.0</FileVersion>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<DocumentationFile>Unchase.Swashbuckle.AspNetCore.Extensions.xml</DocumentationFile>
</PropertyGroup>
Expand Down

0 comments on commit bee21e9

Please sign in to comment.