Skip to content

Commit

Permalink
Removes containment for accessPackageCatalog/accessPackages nav. pr…
Browse files Browse the repository at this point in the history
…op. (#341)

* Remove containment of accessPackages

* Add tests

* Comment update
  • Loading branch information
irvinesunday committed May 5, 2023
1 parent 54a8449 commit 9a0de02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,10 @@
<xsl:apply-templates select="@* | node()"/>
</xsl:template>

<!-- Remove ContainsTarget attribute. -->
<!-- Remove ContainsTarget attribute for both Kiota-based and PowerShell-based CSDL -->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:NavigationProperty[@Name='acceptedSenders']/@ContainsTarget|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:NavigationProperty[@Name='rejectedSenders']/@ContainsTarget">
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:NavigationProperty[@Name='rejectedSenders']/@ContainsTarget|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='accessPackageCatalog']/edm:NavigationProperty[@Name='accessPackages']/@ContainsTarget">
<xsl:apply-templates select="@* | node()"/>
</xsl:template>

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 @@ -70,6 +70,9 @@
<Annotation Term="Org.OData.Core.V1.Description" String="The collection of single-value extended properties defined for the contact. Read-only. Nullable." />
</NavigationProperty>
</EntityType>
<EntityType Name="accessPackageCatalog" BaseType="graph.entity">
<NavigationProperty Name="accessPackages" Type="Collection(graph.accessPackage)" ContainsTarget="true"/>
</EntityType>
<Annotations Target="microsoft.graph.user/joinedGroups">
<Annotation Term="Org.OData.Capabilities.V1.ChangeTracking">
<Record>
Expand Down
3 changes: 3 additions & 0 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@
</Annotation>
</NavigationProperty>
</EntityType>
<EntityType Name="accessPackageCatalog" BaseType="graph.entity">
<NavigationProperty Name="accessPackages" Type="Collection(graph.accessPackage)" />
</EntityType>
<Annotations Target="microsoft.graph.user/joinedGroups">
<Annotation Term="Org.OData.Capabilities.V1.ChangeTracking">
<Record>
Expand Down

0 comments on commit 9a0de02

Please sign in to comment.