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
16 changes: 14 additions & 2 deletions transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2512,7 +2512,6 @@
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='printerShare']/edm:NavigationProperty[@Name='allowedUsers']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='servicePrincipal']/edm:NavigationProperty[@Name='claimsMappingPolicies']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='servicePrincipal']/edm:NavigationProperty[@Name='homeRealmDiscoveryPolicies']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='manager']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='managedDevice']/edm:NavigationProperty[@Name='deviceCategory']|
edm:Schema[@Namespace='microsoft.graph']/edm:ComplexType[@Name='userFlowApiConnectorConfiguration']/edm:NavigationProperty[@Name='postAttributeCollection']|
edm:Schema[@Namespace='microsoft.graph']/edm:ComplexType[@Name='userFlowApiConnectorConfiguration']/edm:NavigationProperty[@Name='postFederationSignup']">
Expand Down Expand Up @@ -2559,7 +2558,6 @@
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='transitiveReports'] |
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='appRoleAssignments'] |
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='oAuth2PermissionGrant'] |
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='manager'] |
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='rbacApplication']/edm:NavigationProperty[@Name='transitiveRoleAssignments']">
<xsl:copy>
<xsl:copy-of select="@*|node()"/>
Expand All @@ -2570,6 +2568,20 @@
</xsl:copy>
</xsl:template>

<!-- Add both $ref and consistency level header to manager navigation property-->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='manager']">
<xsl:copy>
<xsl:copy-of select="@*|node()"/>
<xsl:element name="Annotation">
<xsl:attribute name="Term">Org.OData.Capabilities.V1.ReadRestrictions</xsl:attribute>
<xsl:call-template name="ConsistencyLevelHeaderTemplate"/>
</xsl:element>
<xsl:call-template name="ReferenceableRestrictionsTemplate">
<xsl:with-param name="referenceable">true</xsl:with-param>
</xsl:call-template>
</xsl:copy>
</xsl:template>

<!-- Add IfMatch header for these paths-->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='planner'] |
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:NavigationProperty[@Name='planner'] |
Expand Down
1 change: 1 addition & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<NavigationProperty Name="messages" Type="Collection(graph.message)" ContainsTarget="true" />
<NavigationProperty Name="memberOf" Type="Collection(graph.directoryObject)" />
<NavigationProperty Name="followedSites" Type="Collection(graph.site)" />
<NavigationProperty Name="manager" Type="graph.directoryObject" />
</EntityType>
<EntityType Name="site" BaseType="graph.baseItem">
<NavigationProperty Name="analytics" Type="graph.itemAnalytics" ContainsTarget="true">
Expand Down
33 changes: 33 additions & 0 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@
<EntityType Name="synchronizationJob" BaseType="graph.entity">
<NavigationProperty Name="schema" Type="graph.synchronizationSchema" ContainsTarget="true" />
</EntityType>
<EntityType Name="schema" BaseType="graph.entity">
<Property Name="baseType" Type="Edm.String" Nullable="false" />
<Property Name="properties" Type="Collection(graph.property)" />
</EntityType>
<EntityType Name="synchronizationSchema" BaseType="graph.entity">
<Property Name="synchronizationRules" Type="Collection(graph.synchronizationRule)" />
<Property Name="version" Type="Edm.String" />
Expand Down Expand Up @@ -334,6 +338,35 @@
</Collection>
</Annotation>
</NavigationProperty>
<NavigationProperty Name="manager" Type="graph.directoryObject">
<Annotation Term="Org.OData.Capabilities.V1.ReadRestrictions">
<Record>
<PropertyValue Property="CustomHeaders">
<Collection>
<Record>
<PropertyValue Property="Name" String="ConsistencyLevel" />
<PropertyValue Property="Description" String="Indicates the requested consistency level." />
<PropertyValue Property="DocumentationURL" String="https://docs.microsoft.com/graph/aad-advanced-queries" />
<PropertyValue Property="Required" Bool="false" />
<PropertyValue Property="ExampleValues">
<Collection>
<Record>
<PropertyValue Property="Value" String="eventual" />
<PropertyValue Property="Description" String="$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'." />
</Record>
</Collection>
</PropertyValue>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.NavigationRestrictions">
<Record>
<PropertyValue Property="Referenceable" Bool="true" />
</Record>
</Annotation>
</NavigationProperty>
</EntityType>
<EntityType Name="site" BaseType="graph.baseItem">
<NavigationProperty Name="analytics" Type="graph.itemAnalytics" ContainsTarget="true">
Expand Down
Loading