Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private void RetrieveNavigationSourcePaths(IEdmNavigationSource navigationSource
RetrieveComplexPropertyPaths(entityType, path, convertSettings);

// navigation property
foreach (IEdmNavigationProperty np in entityType.DeclaredNavigationProperties())
foreach (IEdmNavigationProperty np in entityType.NavigationProperties())
{
if (CanFilter(np))
{
Expand Down Expand Up @@ -553,7 +553,7 @@ private void RetrieveNavigationPropertyPaths(
if (shouldExpand)
{
// expand to sub navigation properties
foreach (IEdmNavigationProperty subNavProperty in navEntityType.DeclaredNavigationProperties())
foreach (IEdmNavigationProperty subNavProperty in navEntityType.NavigationProperties())
{
if (CanFilter(subNavProperty))
{
Expand Down Expand Up @@ -693,7 +693,7 @@ bool filter(IEdmStructuredType x) =>
continue;
}

foreach (var declaredNavigationProperty in targetType.DeclaredNavigationProperties())
foreach (var declaredNavigationProperty in targetType.NavigationProperties())
{
RetrieveNavigationPropertyPaths(declaredNavigationProperty, null, castPath, convertSettings);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackageId>Microsoft.OpenApi.OData</PackageId>
<SignAssembly>true</SignAssembly>
<Version>1.4.0-preview5</Version>
<Version>1.4.0-preview6</Version>
<Description>This package contains the codes you need to convert OData CSDL to Open API Document of Model.</Description>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>Microsoft OpenApi OData EDM</PackageTags>
Expand All @@ -25,7 +25,8 @@
- Aliases or strips namespace prefixes from segment names when and where applicable #365
- Adds support for all Org.OData.Core.V1.RevisionKind enum values #372
- Use directly annotated CountRestriction annotations when creating $count segments for collection-valued navigation properties #328
- Use MediaType annotation to set the content types of operations with Edm.Stream return types #342
- Use MediaType annotation to set the content types of operations with Edm.Stream return types #342
- Retrieves navigation properties from base types #371
</PackageReleaseNotes>
<AssemblyName>Microsoft.OpenApi.OData.Reader</AssemblyName>
<AssemblyOriginatorKeyFile>..\..\tool\Microsoft.OpenApi.OData.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void GetPathsForGraphBetaModelReturnsAllPaths()

// Assert
Assert.NotNull(paths);
Assert.Equal(18050, paths.Count());
Assert.Equal(18409, paths.Count());
AssertGraphBetaModelPaths(paths);
}

Expand All @@ -67,6 +67,9 @@ private void AssertGraphBetaModelPaths(IEnumerable<ODataPath> paths)

// Test that count restrictions annotations for navigation properties work
Assert.Null(paths.FirstOrDefault(p => p.GetPathItemName().Equals("/me/drives/$count")));

// Test that navigation properties on base types are created
Assert.NotNull(paths.FirstOrDefault(p => p.GetPathItemName().Equals("/print/printers({id})/jobs")));
}

[Fact]
Expand All @@ -87,7 +90,7 @@ public void GetPathsForGraphBetaModelWithDerivedTypesConstraintReturnsAllPaths()

// Assert
Assert.NotNull(paths);
Assert.Equal(18701, paths.Count());
Assert.Equal(19060, paths.Count());
}

[Theory]
Expand Down
Loading