Skip to content

Commit 52aebf7

Browse files
committed
- adds test case for derived type constraint
1 parent 2324d28 commit 52aebf7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/Typewriter.Test/Metadata/MetadataMultipleNamespaces.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,25 @@
3434
<NavigationProperty Name="testInvalidNav" Type="graph.entityType2" />
3535
<NavigationProperty Name="testExplicitNav" Type="graph.entityType3" />
3636
</EntityType>
37+
<EntityType Name="directoryObject" BaseType="graph.entity" OpenType="true">
38+
<Property Name="deletedDateTime" Type="Edm.DateTimeOffset" />
39+
</EntityType>
40+
<EntityType Name="user" BaseType="graph.directoryObject" OpenType="true">
41+
<Property Name="accountEnabled" Type="Edm.Boolean">
42+
<Annotation Term="Org.OData.Core.V1.Description" String="true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter." />
43+
</Property>
44+
</EntityType>
45+
<EntityType Name="group" BaseType="graph.directoryObject" OpenType="true">
46+
<NavigationProperty Name="members" Type="Collection(graph.directoryObject)">
47+
<Annotation Term="Org.OData.Core.V1.Description" String="Users and groups that are members of this Adminsitrative Unit. HTTP Methods: GET (list members), POST (add members), DELETE (remove members)." />
48+
<Annotation Term="Org.OData.Core.V1.DerivedTypeConstraint">
49+
<Collection>
50+
<String>graph.user</String>
51+
<String>graph.group</String>
52+
</Collection>
53+
</Annotation>
54+
</NavigationProperty>
55+
</EntityType>
3756
<!--Colliding with endpoint in callRecords namespace-->
3857
<EntityType Name="endpoint" BaseType="graph.entity">
3958
<Property Name="property1" Type="Edm.Int64" />

0 commit comments

Comments
 (0)