Skip to content

Commit 1ac58c5

Browse files
committed
fix: ediscovery mandatory parameter removal
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent 1dcbf9b commit 1ac58c5

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

transforms/csdl/preprocess_csdl.xsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,8 @@
669669
<!-- This should be a temp fix, tracking: https://github.com/microsoft/OpenAPI.NET.OData/issues/582 -->
670670
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Action[@Name='verify']/edm:Parameter[@Name='forceTakeover']"/>
671671

672+
<xsl:template match="edm:Schema[@Namespace='microsoft.graph.security']/edm:Action[@Name='estimateStatistics']/edm:Parameter[@Name='statisticsOptions']"/>
673+
672674
<!-- Remove action parameters -->
673675
<!-- This should be a temp fix, tracking: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/issues/261 -->
674676
<!-- <xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:Action[@Name='createUploadSession']/edm:Parameter[@Name='deferCommit']"/> -->

transforms/csdl/preprocess_csdl_test_input.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,5 +651,23 @@
651651
<Annotation Term="Org.OData.Capabilities.V1.SkipSupported" Bool="false" />
652652
</Annotations>
653653
</Schema>
654+
<Schema Namespace="microsoft.graph.security" xmlns="http://docs.oasis-open.org/odata/ns/edm">
655+
<EnumType Name="statisticsOptions" IsFlags="true">
656+
<Member Name="includeRefiners" Value="1" />
657+
<Member Name="includeQueryStats" Value="2" />
658+
<Member Name="includeUnindexedStats" Value="4" />
659+
<Member Name="advancedIndexing" Value="8" />
660+
<Member Name="locationsWithoutHits" Value="16" />
661+
<Member Name="unknownFutureValue" Value="32" />
662+
</EnumType>
663+
<EntityType Name="ediscoverySearch">
664+
<Property Name="dummyProperty" Type="string" />
665+
<!-- this is partial since we only need the entity type for the action-->
666+
</EntityType>
667+
<Action Name="estimateStatistics" IsBound="true">
668+
<Parameter Name="bindingParameter" Type="microsoft.graph.security.ediscoverySearch" />
669+
<Parameter Name="statisticsOptions" Type="microsoft.graph.security.statisticsOptions" />
670+
</Action>
671+
</Schema>
654672
</edmx:DataServices>
655673
</edmx:Edmx>

transforms/csdl/preprocess_csdl_test_output.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,5 +1677,22 @@
16771677
</Annotation>
16781678
</Annotations>
16791679
</Schema>
1680+
<Schema Namespace="microsoft.graph.security" xmlns="http://docs.oasis-open.org/odata/ns/edm">
1681+
<EnumType Name="statisticsOptions" IsFlags="true">
1682+
<Member Name="includeRefiners" Value="1" />
1683+
<Member Name="includeQueryStats" Value="2" />
1684+
<Member Name="includeUnindexedStats" Value="4" />
1685+
<Member Name="advancedIndexing" Value="8" />
1686+
<Member Name="locationsWithoutHits" Value="16" />
1687+
<Member Name="unknownFutureValue" Value="32" />
1688+
</EnumType>
1689+
<EntityType Name="ediscoverySearch">
1690+
<Property Name="dummyProperty" Type="string" />
1691+
<!-- this is partial since we only need the entity type for the action-->
1692+
</EntityType>
1693+
<Action Name="estimateStatistics" IsBound="true">
1694+
<Parameter Name="bindingParameter" Type="microsoft.graph.security.ediscoverySearch" />
1695+
</Action>
1696+
</Schema>
16801697
</edmx:DataServices>
16811698
</edmx:Edmx>

0 commit comments

Comments
 (0)