Skip to content

Commit

Permalink
Adds referenceability for attributes nav. prop (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
irvinesunday authored Nov 14, 2023
1 parent 458111d commit 41e99a6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,15 @@
</xsl:call-template>
</xsl:copy>
</xsl:template>

<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:ComplexType[@Name='onAttributeCollectionExternalUsersSelfServiceSignUp']/edm:NavigationProperty[@Name='attributes']">
<xsl:copy>
<xsl:copy-of select="@* | node()" />
<xsl:call-template name="ReferenceableRestrictionsTemplate">
<xsl:with-param name="referenceable">true</xsl:with-param>
</xsl:call-template>
</xsl:copy>
</xsl:template>

<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:NavigationProperty[@Name='createdObjects']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='servicePrincipal']/edm:NavigationProperty[@Name='createdObjects']">
Expand Down
3 changes: 3 additions & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
<Property Name="onAttributeCollection" Type="graph.onAttributeCollectionHandler" />
<Property Name="onAuthenticationMethodLoadStart" Type="graph.onAuthenticationMethodLoadStartHandler" />
</EntityType>
<ComplexType Name="onAttributeCollectionExternalUsersSelfServiceSignUp" BaseType="graph.onAttributeCollectionHandler">
<NavigationProperty Name="attributes" Type="Collection(graph.identityUserFlowAttribute)" />
</ComplexType>
<ComplexType Name="onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp" BaseType="graph.onAuthenticationMethodLoadStartHandler">
<NavigationProperty Name="identityProviders" Type="Collection(graph.identityProviderBase)" />
</ComplexType>
Expand Down
9 changes: 9 additions & 0 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,15 @@
</Annotation>
</Property>
</EntityType>
<ComplexType Name="onAttributeCollectionExternalUsersSelfServiceSignUp" BaseType="graph.onAttributeCollectionHandler">
<NavigationProperty Name="attributes" Type="Collection(graph.identityUserFlowAttribute)">
<Annotation Term="Org.OData.Capabilities.V1.NavigationRestrictions">
<Record>
<PropertyValue Property="Referenceable" Bool="true" />
</Record>
</Annotation>
</NavigationProperty>
</ComplexType>
<ComplexType Name="onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp" BaseType="graph.onAuthenticationMethodLoadStartHandler">
<NavigationProperty Name="identityProviders" Type="Collection(graph.identityProviderBase)">
<Annotation Term="Org.OData.Capabilities.V1.NavigationRestrictions">
Expand Down

0 comments on commit 41e99a6

Please sign in to comment.