Skip to content

Commit 97e55f3

Browse files
authored
Merge pull request #771 from microsoftgraph/tm/fix-conflict
Adds both $ref and consistency level header to manager navigation property
2 parents 217b0d2 + afc0843 commit 97e55f3

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

transforms/csdl/preprocess_csdl.xsl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,7 +2512,6 @@
25122512
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='printerShare']/edm:NavigationProperty[@Name='allowedUsers']|
25132513
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='servicePrincipal']/edm:NavigationProperty[@Name='claimsMappingPolicies']|
25142514
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='servicePrincipal']/edm:NavigationProperty[@Name='homeRealmDiscoveryPolicies']|
2515-
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='manager']|
25162515
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='managedDevice']/edm:NavigationProperty[@Name='deviceCategory']|
25172516
edm:Schema[@Namespace='microsoft.graph']/edm:ComplexType[@Name='userFlowApiConnectorConfiguration']/edm:NavigationProperty[@Name='postAttributeCollection']|
25182517
edm:Schema[@Namespace='microsoft.graph']/edm:ComplexType[@Name='userFlowApiConnectorConfiguration']/edm:NavigationProperty[@Name='postFederationSignup']">
@@ -2559,7 +2558,6 @@
25592558
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='transitiveReports'] |
25602559
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='appRoleAssignments'] |
25612560
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='oAuth2PermissionGrant'] |
2562-
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='manager'] |
25632561
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='rbacApplication']/edm:NavigationProperty[@Name='transitiveRoleAssignments']">
25642562
<xsl:copy>
25652563
<xsl:copy-of select="@*|node()"/>
@@ -2570,6 +2568,20 @@
25702568
</xsl:copy>
25712569
</xsl:template>
25722570

2571+
<!-- Add both $ref and consistency level header to manager navigation property-->
2572+
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='manager']">
2573+
<xsl:copy>
2574+
<xsl:copy-of select="@*|node()"/>
2575+
<xsl:element name="Annotation">
2576+
<xsl:attribute name="Term">Org.OData.Capabilities.V1.ReadRestrictions</xsl:attribute>
2577+
<xsl:call-template name="ConsistencyLevelHeaderTemplate"/>
2578+
</xsl:element>
2579+
<xsl:call-template name="ReferenceableRestrictionsTemplate">
2580+
<xsl:with-param name="referenceable">true</xsl:with-param>
2581+
</xsl:call-template>
2582+
</xsl:copy>
2583+
</xsl:template>
2584+
25732585
<!-- Add IfMatch header for these paths-->
25742586
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='planner'] |
25752587
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:NavigationProperty[@Name='planner'] |

transforms/csdl/preprocess_csdl_test_input.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<NavigationProperty Name="messages" Type="Collection(graph.message)" ContainsTarget="true" />
7777
<NavigationProperty Name="memberOf" Type="Collection(graph.directoryObject)" />
7878
<NavigationProperty Name="followedSites" Type="Collection(graph.site)" />
79+
<NavigationProperty Name="manager" Type="graph.directoryObject" />
7980
</EntityType>
8081
<EntityType Name="site" BaseType="graph.baseItem">
8182
<NavigationProperty Name="analytics" Type="graph.itemAnalytics" ContainsTarget="true">

transforms/csdl/preprocess_csdl_test_output.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@
226226
<EntityType Name="synchronizationJob" BaseType="graph.entity">
227227
<NavigationProperty Name="schema" Type="graph.synchronizationSchema" ContainsTarget="true" />
228228
</EntityType>
229+
<EntityType Name="schema" BaseType="graph.entity">
230+
<Property Name="baseType" Type="Edm.String" Nullable="false" />
231+
<Property Name="properties" Type="Collection(graph.property)" />
232+
</EntityType>
229233
<EntityType Name="synchronizationSchema" BaseType="graph.entity">
230234
<Property Name="synchronizationRules" Type="Collection(graph.synchronizationRule)" />
231235
<Property Name="version" Type="Edm.String" />
@@ -334,6 +338,35 @@
334338
</Collection>
335339
</Annotation>
336340
</NavigationProperty>
341+
<NavigationProperty Name="manager" Type="graph.directoryObject">
342+
<Annotation Term="Org.OData.Capabilities.V1.ReadRestrictions">
343+
<Record>
344+
<PropertyValue Property="CustomHeaders">
345+
<Collection>
346+
<Record>
347+
<PropertyValue Property="Name" String="ConsistencyLevel" />
348+
<PropertyValue Property="Description" String="Indicates the requested consistency level." />
349+
<PropertyValue Property="DocumentationURL" String="https://docs.microsoft.com/graph/aad-advanced-queries" />
350+
<PropertyValue Property="Required" Bool="false" />
351+
<PropertyValue Property="ExampleValues">
352+
<Collection>
353+
<Record>
354+
<PropertyValue Property="Value" String="eventual" />
355+
<PropertyValue Property="Description" String="$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'." />
356+
</Record>
357+
</Collection>
358+
</PropertyValue>
359+
</Record>
360+
</Collection>
361+
</PropertyValue>
362+
</Record>
363+
</Annotation>
364+
<Annotation Term="Org.OData.Capabilities.V1.NavigationRestrictions">
365+
<Record>
366+
<PropertyValue Property="Referenceable" Bool="true" />
367+
</Record>
368+
</Annotation>
369+
</NavigationProperty>
337370
</EntityType>
338371
<EntityType Name="site" BaseType="graph.baseItem">
339372
<NavigationProperty Name="analytics" Type="graph.itemAnalytics" ContainsTarget="true">

0 commit comments

Comments
 (0)