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
17 changes: 16 additions & 1 deletion transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
</Annotation>
</xsl:copy>
</xsl:template>
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='backupRestoreRoot']/edm:NavigationProperty[@Name='protectionUnits']">
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='backupRestoreRoot']/edm:NavigationProperty[@Name='protectionUnits']">
<xsl:copy>
<xsl:copy-of select="@* | node()" />
<Annotation Term="Org.OData.Validation.V1.DerivedTypeConstraint">
Expand All @@ -510,6 +510,12 @@
<String>microsoft.graph.driveProtectionUnit</String>
</Collection>
</Annotation>
<Annotation Term="Org.OData.Core.V1.ExplicitOperationBindings">
<Collection>
<String>microsoft.graph.cancelOffboard</String>
<String>microsoft.graph.offboard</String>
</Collection>
</Annotation>
</xsl:copy>
</xsl:template>
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='externalUsersSelfServiceSignUpEventsFlow']/edm:Property[@Name='onAttributeCollection']">
Expand Down Expand Up @@ -700,6 +706,15 @@
<Annotation Term="Org.OData.Core.V1.RequiresExplicitBinding"/>
</xsl:copy>
</xsl:template>

<!-- Actions bound to protectionUnitBase should have the 'RequiresExplicitBinding' annotation-->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Action[@Name='offboard'][edm:Parameter[@Name='bindingParameter']][edm:Parameter[@Type='graph.protectionUnitBase']] |
edm:Schema[@Namespace='microsoft.graph']/edm:Action[@Name='cancelOffboard'][edm:Parameter[@Name='bindingParameter']][edm:Parameter[@Type='graph.protectionUnitBase']]">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
<Annotation Term="Org.OData.Core.V1.RequiresExplicitBinding"/>
</xsl:copy>
</xsl:template>

<!--Delta function for events need the start and end date parameters-->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Function[@Name='delta'][edm:Parameter[@Name='bindingparameter']][edm:Parameter[@Type='Collection(graph.event)']]">
Expand Down
8 changes: 8 additions & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,14 @@
</Parameter>
<ReturnType Type="graph.directoryObject" />
</Action>
<Action Name="cancelOffboard" IsBound="true">
<Parameter Name="bindingParameter" Type="graph.protectionUnitBase" />
<ReturnType Type="graph.protectionUnitBase" />
</Action>
<Action Name="offboard" IsBound="true">
<Parameter Name="bindingParameter" Type="graph.protectionUnitBase" />
<ReturnType Type="graph.protectionUnitBase" />
</Action>
<Action Name="add" IsBound="true">
<Parameter Name="bindingParameter" Type="Collection(graph.site)" />
<Parameter Name="value" Type="Collection(graph.site)" />
Expand Down
16 changes: 16 additions & 0 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,12 @@
<String>microsoft.graph.driveProtectionUnit</String>
</Collection>
</Annotation>
<Annotation Term="Org.OData.Core.V1.ExplicitOperationBindings" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>microsoft.graph.cancelOffboard</String>
<String>microsoft.graph.offboard</String>
</Collection>
</Annotation>
</NavigationProperty>
</EntityType>
<EntityType Name="b2xIdentityUserFlow" BaseType="graph.identityUserFlow">
Expand Down Expand Up @@ -1362,6 +1368,16 @@
<ReturnType Type="graph.directoryObject" />
<Annotation Term="Org.OData.Core.V1.RequiresExplicitBinding" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm" />
</Action>
<Action Name="cancelOffboard" IsBound="true">
<Parameter Name="bindingParameter" Type="graph.protectionUnitBase" />
<ReturnType Type="graph.protectionUnitBase" />
<Annotation Term="Org.OData.Core.V1.RequiresExplicitBinding" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm" />
</Action>
<Action Name="offboard" IsBound="true">
<Parameter Name="bindingParameter" Type="graph.protectionUnitBase" />
<ReturnType Type="graph.protectionUnitBase" />
<Annotation Term="Org.OData.Core.V1.RequiresExplicitBinding" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm" />
</Action>
<Action Name="add" IsBound="true">
<Parameter Name="bindingParameter" Type="Collection(graph.site)" />
<Parameter Name="value" Type="Collection(graph.site)" />
Expand Down
Loading