Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into is/authentication-e…
Browse files Browse the repository at this point in the history
…vents-flow-api
  • Loading branch information
irvinesunday committed Oct 25, 2023
2 parents 7e8f7a3 + d1bb282 commit 1862b55
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 1 deletion.
24 changes: 24 additions & 0 deletions transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,30 @@
</xsl:copy>
</xsl:template>

<!-- Add Acceptable Media Types -->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='organizationalBrandingProperties']/edm:Property[@Name='backgroundImage']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='organizationalBrandingProperties']/edm:Property[@Name='bannerLogo']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='organizationalBrandingProperties']/edm:Property[@Name='customCSS']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='organizationalBrandingProperties']/edm:Property[@Name='favicon']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='organizationalBrandingProperties']/edm:Property[@Name='headerLogo']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='organizationalBrandingProperties']/edm:Property[@Name='squareLogo']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='organizationalBrandingProperties']/edm:Property[@Name='squareLogoDark']">
<xsl:copy>
<xsl:copy-of select="@* | node()" />
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</xsl:copy>
</xsl:template>

<!-- Add odata cast annotation -->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:NavigationProperty[@Name='members']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:NavigationProperty[@Name='membersWithLicenseErrors']|
Expand Down
9 changes: 9 additions & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@
<EntityType Name="rbacApplication" BaseType="graph.entity">
<NavigationProperty Name="transitiveRoleAssignments" Type="Collection(graph.unifiedRoleAssignment)" ContainsTarget="true" />
</EntityType>
<EntityType Name="organizationalBrandingProperties" BaseType="graph.entity" Abstract="true">
<Property Name="backgroundImage" Type="Edm.Stream" />
<Property Name="bannerLogo" Type="Edm.Stream" />
<Property Name="customCSS" Type="Edm.Stream" />
<Property Name="favicon" Type="Edm.Stream" />
<Property Name="headerLogo" Type="Edm.Stream" />
<Property Name="squareLogo" Type="Edm.Stream" />
<Property Name="squareLogoDark" Type="Edm.Stream" />
</EntityType>
<EntityType Name="externalUsersSelfServiceSignUpEventsFlow" BaseType="graph.authenticationEventsFlow">
<Property Name="onAttributeCollection" Type="graph.onAttributeCollectionHandler" />
<Property Name="onAuthenticationMethodLoadStart" Type="graph.onAuthenticationMethodLoadStartHandler" />
Expand Down
95 changes: 94 additions & 1 deletion 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 @@ -404,6 +404,99 @@
</Annotation>
</NavigationProperty>
</EntityType>
<EntityType Name="organizationalBrandingProperties" BaseType="graph.entity" Abstract="true">
<Property Name="backgroundImage" Type="Edm.Stream">
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</Property>
<Property Name="bannerLogo" Type="Edm.Stream">
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</Property>
<Property Name="customCSS" Type="Edm.Stream">
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</Property>
<Property Name="favicon" Type="Edm.Stream">
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</Property>
<Property Name="headerLogo" Type="Edm.Stream">
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</Property>
<Property Name="squareLogo" Type="Edm.Stream">
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</Property>
<Property Name="squareLogoDark" Type="Edm.Stream">
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
<Collection>
<String>image/bmp</String>
<String>image/jpg</String>
<String>image/jpeg</String>
<String>image/gif</String>
<String>image/vnd.microsoft.icon</String>
<String>image/png</String>
<String>image/tiff</String>
</Collection>
</Annotation>
</Property>
</EntityType>
<EntityType Name="externalUsersSelfServiceSignUpEventsFlow" BaseType="graph.authenticationEventsFlow">
<Property Name="onAttributeCollection" Type="graph.onAttributeCollectionHandler">
<Annotation Term="Org.OData.Validation.V1.DerivedTypeConstraint" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm">
Expand Down

0 comments on commit 1862b55

Please sign in to comment.