-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Labels
priority:p0Blocking issue/ loss of critical functions. An ICM may be filed to communicate urgency. SLA<=48hrsBlocking issue/ loss of critical functions. An ICM may be filed to communicate urgency. SLA<=48hrstype:feature
Milestone
Description
We need to generate complex properties of derived types (besides the navigation properties as we currently do).
We'll need to update this code block to achieve this:
OpenAPI.NET.OData/src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs
Lines 690 to 701 in 2a48a30
| if (convertSettings.ExpandDerivedTypesNavigationProperties) | |
| { | |
| if (annotable is IEdmNavigationProperty navigationProperty && !navigationProperty.ContainsTarget) | |
| { | |
| continue; | |
| } | |
| foreach (var declaredNavigationProperty in targetType.NavigationProperties()) | |
| { | |
| RetrieveNavigationPropertyPaths(declaredNavigationProperty, null, castPath, convertSettings); | |
| } | |
| } |
to something like...
if (convertSettings.ExpandDerivedTypesNavigationProperties)
{
if (annotable is IEdmNavigationProperty navigationProperty && !navigationProperty.ContainsTarget)
{
continue;
}
foreach (var declaredNavigationProperty in targetType.NavigationProperties())
{
RetrieveNavigationPropertyPaths(declaredNavigationProperty, null, castPath, convertSettings);
}
if (targetType is IEdmEntityType entityType)
{
RetrieveComplexPropertyPaths(entityType, castPath, convertSettings);
}
}Thoughts: Should we add a new convert setting named RetrieveDerivedTypesProperties and deprecate ExpandDerivedTypesNavigationProperties. This will account for retrieving both complex and navigation properties of derived types.
Related to: microsoftgraph/msgraph-metadata#465 (this feature is required for the mentioned issue to be achieved)
Metadata
Metadata
Assignees
Labels
priority:p0Blocking issue/ loss of critical functions. An ICM may be filed to communicate urgency. SLA<=48hrsBlocking issue/ loss of critical functions. An ICM may be filed to communicate urgency. SLA<=48hrstype:feature