Skip to content

Commit

Permalink
temporary fix for metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman committed Sep 25, 2024
1 parent 45c385e commit afefc8d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
6 changes: 5 additions & 1 deletion transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Function[@Name='delta'][edm:Parameter[@Name='token']][edm:Parameter[@Type='Collection(graph.site)']]"/>
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Function[@Name='additionalAccess'][edm:Parameter[@Name='accessPackageId']][edm:Parameter[@Type='Collection(graph.accessPackageAssignment)']][1]"/>

<!-- Remove action parameter -->
<!-- This should be a temp fix, tracking: https://github.com/microsoft/OpenAPI.NET.OData/issues/582 -->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Action[@Name='restore']/edm:Parameter[@Name='autoReconcileProxyConflict']"/>

<!-- Remove action parameters -->
<!-- This should be a temp fix, tracking: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/issues/261 -->
<!-- <xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Action[@Name='createUploadSession']/edm:Parameter[@Name='deferCommit']"/> -->
Expand All @@ -662,7 +666,7 @@
edm:Schema[@Namespace='microsoft.graph']/edm:Function[@IsBound='true'][edm:Parameter[@Type='graph.directoryObject']] |
edm:Schema[@Namespace='microsoft.graph']/edm:Function[@IsBound='true'][edm:Parameter[@Type='Collection(graph.directoryObject)']]">
<xsl:copy>
<xsl:copy-of select="@* | node()" />
<xsl:apply-templates select="@* | node()" />
<Annotation Term="Org.OData.Core.V1.RequiresExplicitBinding"/>
</xsl:copy>
</xsl:template>
Expand Down
7 changes: 7 additions & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,13 @@
<Parameter Name="method" Type="graph.Json" />
<ReturnType Type="graph.workbookFunctionResult" />
</Action>
<Action Name="restore" IsBound="true">
<Parameter Name="bindingParameter" Type="graph.directoryObject" Nullable="false" />
<Parameter Name="autoReconcileProxyConflict" Type="Edm.Boolean">
<Annotation Term="Org.OData.Core.V1.OptionalParameter" />
</Parameter>
<ReturnType Type="graph.directoryObject" />
</Action>
<Action Name="add" IsBound="true">
<Parameter Name="bindingParameter" Type="Collection(graph.site)" />
<Parameter Name="value" Type="Collection(graph.site)" />
Expand Down
23 changes: 14 additions & 9 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='preprocess_csdl.xsl'?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:DataServices>
Expand Down Expand Up @@ -562,11 +562,11 @@
</Collection>
</Annotation>
</Property>
</EntityType>
<EntityType Name="workbookFunctionResult" BaseType="graph.entity">
<Property Name="error" Type="Edm.String" />
<Property Name="value" Type="Edm.Untyped" />
</EntityType>
</EntityType>
<EntityType Name="workbookFunctionResult" BaseType="graph.entity">
<Property Name="error" Type="Edm.String" />
<Property Name="value" Type="graph.Json" />
</EntityType>
<EntityType Name="authenticationEventsFlow" BaseType="graph.entity" Abstract="true" OpenType="true">
<Property Name="conditions" Type="graph.authenticationConditions">
<Annotation Term="Org.OData.Core.V1.Description" String="The conditions representing the context of the authentication request that will be used to decide whether the events policy will be invoked." />
Expand Down Expand Up @@ -1190,11 +1190,16 @@
</Function>
<Action Name="days360" IsBound="true">
<Parameter Name="bindparameter" Type="graph.workbookFunctions" />
<Parameter Name="startDate" Type="Edm.Untyped" />
<Parameter Name="endDate" Type="Edm.Untyped" />
<Parameter Name="method" Type="Edm.Untyped" />
<Parameter Name="startDate" Type="graph.Json" />
<Parameter Name="endDate" Type="graph.Json" />
<Parameter Name="method" Type="graph.Json" />
<ReturnType Type="graph.workbookFunctionResult" />
</Action>
<Action Name="restore" IsBound="true">
<Parameter Name="bindingParameter" Type="graph.directoryObject" Nullable="false" />
<ReturnType Type="graph.directoryObject" />
<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

0 comments on commit afefc8d

Please sign in to comment.