Skip to content

Commit

Permalink
1. Update the version to 1.0.7
Browse files Browse the repository at this point in the history
2. Add PublicApi analyzier
3. Add config for ShowMsDocGroupPath
  • Loading branch information
xuzhg committed Apr 13, 2021
1 parent 4c685b5 commit 5531eb3
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<Import Project="..\Build.props" />

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.OData.Edm" Version="7.6.1" />
<PackageReference Include="Microsoft.OpenApi" Version="1.2.2" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ public string PathPrefix
/// </summary>
public bool ShowRootPath { get; set; } = false;

/// <summary>
/// Gets/sets a value indicating whether or not to show the group path extension.
/// </summary>
public bool ShowMsDosGroupPath { get; set; } = true;

/// <summary>
/// Gets/sets a the path provider.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ protected override void Initialize(ODataContext context, ODataPath path)
/// <inheritdoc/>
protected override void SetExtensions(OpenApiPathItem item)
{
if (!Context.Settings.ShowMsDosGroupPath)
{
return;
}

IList<ODataPath> samePaths = new List<ODataPath>();
foreach (var path in Context.AllPaths.Where(p => p.Kind == ODataPathKind.NavigationProperty && p != Path))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ protected override void Initialize(ODataContext context, ODataPath path)
/// <inheritdoc/>
protected override void SetExtensions(OpenApiPathItem item)
{
if (!Context.Settings.ShowMsDosGroupPath)
{
return;
}

ODataNavigationSourceSegment navigationSourceSegment = Path.FirstSegment as ODataNavigationSourceSegment;
IEdmNavigationSource currentNavSource = navigationSourceSegment.NavigationSource;

Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.OpenApi.OData.Reader/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

211 changes: 211 additions & 0 deletions src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tool/versioning.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup>
<VersionMajor Condition="'$(VersionMajor)' == ''">1</VersionMajor>
<VersionMinor Condition="'$(VersionMinor)' == ''">0</VersionMinor>
<VersionBuild Condition="'$(VersionBuild)' == ''">6</VersionBuild>
<VersionBuild Condition="'$(VersionBuild)' == ''">7</VersionBuild>
<VersionRelease Condition="'$(VersionRelease)' == ''"></VersionRelease>
</PropertyGroup>

Expand Down

0 comments on commit 5531eb3

Please sign in to comment.