msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Only generate navigation properties for those that can be expanded

Open darrelmiller opened this issue 5 years ago • 1 comments

Having navigation properties in models that do not support expand, is redundant as they will always be null. We need to add expand capability annotations to the metadata, so that OpenAPI has only the actual expand properties. AB#7437

darrelmiller avatar Jan 21 '20 20:01 darrelmiller

We will need a separate transform for PowerShell that will remove all navigation properties where ExpandRestrictions has Expandable = false. This will also be applicable to model only generation scenarios like PHP, Typescript (for now), Objective-C, and Python (what's currently supported in the generator).

    <Annotation Term="Org.OData.Capabilities.V1.ExpandRestrictions">
      <Record>
        <PropertyValue Property="Expandable" Bool="false" />
      </Record>
    </Annotation>

MIchaelMainer avatar Jan 21 '20 20:01 MIchaelMainer

Closing as duplicate of https://github.com/microsoftgraph/microsoft-graph-devx-api/issues/377.

peombwa avatar Dec 14 '22 19:12 peombwa