forked from oasis-tcs/odata-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProducts.xml
More file actions
90 lines (90 loc) · 4.94 KB
/
Products.xml
File metadata and controls
90 lines (90 loc) · 4.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="./People.xml">
<edmx:Include Namespace="PeopleService" />
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1" />
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="ProductService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<EntityType Name="Product">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
<Property Name="Name" Type="Edm.String" />
<Property Name="Description" Type="Edm.String" />
<Property Name="ReleaseDate" Type="Edm.DateTimeOffset" Nullable="false" />
<Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset" />
<Property Name="Rating" Type="Edm.Int16" Nullable="false" />
<Property Name="Price" Type="Edm.Double" Nullable="false" />
<NavigationProperty Name="Categories" Type="Collection(ProductService.Category)" Partner="Products" />
<NavigationProperty Name="Supplier" Type="PeopleService.Supplier" Partner="Products" />
<NavigationProperty Name="ProductDetail" Type="ProductService.ProductDetail" Partner="Product" />
</EntityType>
<EntityType Name="FeaturedProduct" BaseType="ProductService.Product">
<NavigationProperty Name="Advertisement" Type="ProductService.Advertisement" Partner="FeaturedProduct" />
</EntityType>
<EntityType Name="ProductDetail">
<Key>
<PropertyRef Name="ProductID" />
</Key>
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
<Property Name="Details" Type="Edm.String" />
<NavigationProperty Name="Product" Type="ProductService.Product" Nullable="false" Partner="ProductDetail">
<ReferentialConstraint Property="ProductID" ReferencedProperty="Product/ID" />
</NavigationProperty>
</EntityType>
<EntityType Name="Category" OpenType="true">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
<Property Name="Name" Type="Edm.String" />
<NavigationProperty Name="Products" Type="Collection(ProductService.Product)" Partner="Categories" />
</EntityType>
<EntityType Name="Advertisement" HasStream="true">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.Guid" Nullable="false" />
<Property Name="Name" Type="Edm.String" />
<Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" />
<NavigationProperty Name="FeaturedProduct" Type="ProductService.FeaturedProduct" Partner="Advertisement" />
</EntityType>
<Action Name="Discount" IsBound="true">
<Parameter Name="product" Type="ProductService.Product" />
<Parameter Name="discountPercentage" Type="Edm.Int32" Nullable="false" />
<ReturnType Type="Edm.Double" Nullable="false" />
</Action>
<EntityContainer Name="Container">
<Annotation Term="Capabilities.KeyAsSegmentSupported" />
<EntitySet Name="Products" EntityType="ProductService.Product">
<NavigationPropertyBinding Path="ProductService.FeaturedProduct/Advertisement" Target="Advertisements" />
<NavigationPropertyBinding Path="Categories" Target="Categories" />
<NavigationPropertyBinding Path="Supplier" Target="PeopleService.Container/Suppliers" />
<NavigationPropertyBinding Path="ProductDetail" Target="ProductDetails" />
</EntitySet>
<EntitySet Name="ProductDetails" EntityType="ProductService.ProductDetail">
<NavigationPropertyBinding Path="Product" Target="Products" />
</EntitySet>
<EntitySet Name="Categories" EntityType="ProductService.Category">
<NavigationPropertyBinding Path="Products" Target="Products" />
</EntitySet>
<EntitySet Name="Advertisements" EntityType="ProductService.Advertisement">
<NavigationPropertyBinding Path="FeaturedProduct" Target="Products" />
</EntitySet>
</EntityContainer>
<Annotations Target="ProductService.Container">
<Annotation Term="Org.OData.Display.V1.Description" String="This is a sample OData service with vocabularies" />
</Annotations>
<Annotations Target="ProductService.Product">
<Annotation Term="Org.OData.Display.V1.Description" String="All Products available in the online store" />
</Annotations>
<Annotations Target="ProductService.Product/Name">
<Annotation Term="Org.OData.Display.V1.DisplayName" String="Product Name" />
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>