forked from oasis-tcs/odata-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontainment.xml
More file actions
345 lines (327 loc) · 15.9 KB
/
containment.xml
File metadata and controls
345 lines (327 loc) · 15.9 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.01">
<!-- TODO:
containment
- multi-level containment
- containment with multi-part key
- recursive containment - limit depth
- NavigationRestrictions and containment
-->
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
<Annotation Term="Core.DefaultNamespace" />
</edmx:Include>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
<edmx:Include Namespace="Org.OData.Validation.V1" Alias="Validation" />
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="Containment" Alias="self">
<EntityType Name="Whole">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.String" Nullable="false" />
<Property Name="Description" Type="Edm.String" />
<NavigationProperty Name="One" Type="self.Part" ContainsTarget="true" />
<NavigationProperty Name="Many" Type="Collection(self.Part)" ContainsTarget="true" />
</EntityType>
<EntityType Name="Part">
<Key>
<PropertyRef Name="index" />
</Key>
<Property Name="index" Type="Edm.Int32" Nullable="false" />
<NavigationProperty Name="One" Type="self.SubPart" ContainsTarget="true" />
<NavigationProperty Name="Many" Type="Collection(self.SubPart)" ContainsTarget="true" />
<NavigationProperty Name="ManyReadListOnly" Type="Collection(self.SubPart)" ContainsTarget="true" />
<NavigationProperty Name="ManyReadByKeyOnly" Type="Collection(self.SubPart)" ContainsTarget="true" />
</EntityType>
<EntityType Name="SubPart">
<Key>
<PropertyRef Name="One" />
<PropertyRef Name="Two" />
</Key>
<Property Name="One" Type="Edm.Int32" Nullable="false" />
<Property Name="Two" Type="Edm.Int32" Nullable="false" />
</EntityType>
<Action Name="Like" IsBound="true">
<Annotation Term="Core.Description" String="I like this whole" />
<Parameter Name="__it" Type="self.Whole" />
</Action>
<Action Name="Like" IsBound="true">
<Annotation Term="Core.Description" String="I like all of these wholes" />
<Parameter Name="__it" Type="Collection(self.Whole)" />
</Action>
<Action Name="Like" IsBound="true">
<Annotation Term="Core.Description" String="I like this part" />
<Parameter Name="__it" Type="self.Part" />
</Action>
<Action Name="Like" IsBound="true">
<Annotation Term="Core.Description" String="I like all of these parts" />
<Parameter Name="__it" Type="Collection(self.Part)" />
</Action>
<Function Name="Likes" IsBound="true">
<Annotation Term="Core.Description" String="How many like this whole" />
<Parameter Name="__it" Type="self.Whole" />
<ReturnType Type="Edm.Int32" />
</Function>
<Function Name="Likes" IsBound="true">
<Annotation Term="Core.Description" String="How many like these wholes" />
<Parameter Name="__it" Type="Collection(self.Whole)" />
<ReturnType Type="Edm.Int32" />
</Function>
<Function Name="Likes" IsBound="true">
<Annotation Term="Core.Description" String="How many like this part" />
<Parameter Name="__it" Type="self.Part" />
<ReturnType Type="Edm.Int32" />
</Function>
<Function Name="Likes" IsBound="true">
<Annotation Term="Core.Description" String="How many like these parts" />
<Parameter Name="__it" Type="Collection(self.Part)" />
<ReturnType Type="Edm.Int32" />
</Function>
<EntityType Name="Folder">
<Key>
<PropertyRef Name="Name" />
</Key>
<Property Name="Name" Type="Edm.String" Nullable="false" />
<Property Name="Description" Type="Edm.String" />
<NavigationProperty Name="Folders" Type="Collection(self.Folder)" ContainsTarget="true" />
</EntityType>
<EntityType Name="Header">
<Key>
<PropertyRef Name="id" />
</Key>
<Property Name="id" Type="Edm.String" Nullable="false" />
<NavigationProperty Name="items" Type="Collection(self.Item)" ContainsTarget="true" Partner="header" />
</EntityType>
<EntityType Name="Item">
<Key>
<PropertyRef Name="pos" />
</Key>
<Property Name="pos" Type="Edm.Int32" Nullable="false" />
<NavigationProperty Name="header" Type="self.Header" Nullable="true" Partner="items" />
</EntityType>
<EntityContainer Name="Container">
<Annotation Term="Capabilities.BatchSupported" Bool="false" />
<EntitySet Name="Wholes" EntityType="self.Whole">
<Annotation Term="Core.Description" String="List of containers" />
</EntitySet>
<Singleton Name="TheWhole" Type="self.Whole">
<Annotation Term="Core.Description" String="Special container" />
<Annotation Term="Capabilities.NavigationRestrictions">
<Record>
<PropertyValue Property="RestrictedProperties">
<Collection>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/Many" />
<PropertyValue Property="InsertRestrictions">
<Record>
<PropertyValue Property="Description" String="Supports insert" />
</Record>
</PropertyValue>
<PropertyValue Property="UpdateRestrictions">
<Record>
<PropertyValue Property="Description" String="Supports update" />
</Record>
</PropertyValue>
<PropertyValue Property="DeleteRestrictions">
<Record>
<PropertyValue Property="Description" String="Supports delete" />
</Record>
</PropertyValue>
</Record>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadListOnly" />
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
</Record>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadByKeyOnly" />
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
<!-- TOD: this is odd, remove Navigability above or set it to Single -->
<PropertyValue Property="SelectSupport">
<Record>
<PropertyValue Property="Supported" Bool="false" />
</Record>
</PropertyValue>
</Record>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadListOnly" />
<PropertyValue Property="ReadRestrictions">
<Record>
<PropertyValue Property="Description" String="Supports only read-list" />
<PropertyValue Property="LongDescription" String="Does not support any system query options" />
</Record>
</PropertyValue>
<PropertyValue Property="FilterRestrictions">
<Record>
<PropertyValue Property="Filterable" Bool="false" />
</Record>
</PropertyValue>
<PropertyValue Property="SearchRestrictions">
<Record>
<PropertyValue Property="Searchable" Bool="false" />
</Record>
</PropertyValue>
<PropertyValue Property="SortRestrictions">
<Record>
<PropertyValue Property="Sortable" Bool="false" />
</Record>
</PropertyValue>
<PropertyValue Property="TopSupported" Bool="false" />
<PropertyValue Property="SkipSupported" Bool="false" />
<PropertyValue Property="SelectSupport">
<Record>
<PropertyValue Property="Supported" Bool="false" />
</Record>
</PropertyValue>
<PropertyValue Property="IndexableByKey" Bool="false" />
<PropertyValue Property="InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="false" />
</Record>
</PropertyValue>
<!-- TODO: turn off query options for GET collection -->
</Record>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadByKeyOnly" />
<PropertyValue Property="InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="false" />
</Record>
</PropertyValue>
<PropertyValue Property="ReadRestrictions">
<Record>
<PropertyValue Property="Readable" Bool="false" />
<PropertyValue Property="ReadByKeyRestrictions">
<Record>
<PropertyValue Property="Readable" Bool="true" />
<PropertyValue Property="Description" String="Supports only read-by-key" />
<PropertyValue Property="LongDescription" String="Does not support `$select`" />
</Record>
</PropertyValue>
</Record>
</PropertyValue>
<PropertyValue Property="SelectSupport">
<Record>
<PropertyValue Property="Supported" Bool="false" />
</Record>
</PropertyValue>
<PropertyValue Property="UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="false" />
</Record>
</PropertyValue>
<PropertyValue Property="DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="false" />
</Record>
</PropertyValue>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Singleton>
<EntitySet Name="Folders" EntityType="self.Folder">
<Annotation Term="Core.Description" String="List of folders" />
</EntitySet>
<EntitySet Name="Headers" EntityType="self.Header">
<Annotation Term="Capabilities.DeepUpdateSupport">
<Record>
<PropertyValue Property="Supported" Bool="true" />
</Record>
</Annotation>
</EntitySet>
</EntityContainer>
<Annotations Target="self.Container/Wholes">
<Annotation Term="Capabilities.NavigationRestrictions">
<Record>
<PropertyValue Property="RestrictedProperties">
<Collection>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadListOnly" />
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
<!-- TOD: this is odd, remove Navigability above or set it to Single -->
<PropertyValue Property="SelectSupport">
<Record>
<PropertyValue Property="Supported">
<Bool>false</Bool>
</PropertyValue>
</Record>
</PropertyValue>
</Record>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadByKeyOnly" />
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
</Record>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadListOnly" />
<PropertyValue Property="IndexableByKey">
<Bool>false</Bool>
</PropertyValue>
<PropertyValue Property="InsertRestrictions">
<Record>
<PropertyValue Property="Insertable">
<Bool>false</Bool>
</PropertyValue>
</Record>
</PropertyValue>
<!-- TODO: turn off query options for GET collection -->
</Record>
<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadByKeyOnly" />
<PropertyValue Property="InsertRestrictions">
<Record>
<PropertyValue Property="Insertable">
<Bool>false</Bool>
</PropertyValue>
</Record>
</PropertyValue>
<PropertyValue Property="ReadRestrictions">
<Record>
<PropertyValue Property="Readable">
<Bool>false</Bool>
</PropertyValue>
<PropertyValue Property="ReadByKeyRestrictions">
<Record>
<PropertyValue Property="Readable">
<Bool>true</Bool>
</PropertyValue>
</Record>
</PropertyValue>
</Record>
</PropertyValue>
<PropertyValue Property="SelectSupport">
<Record>
<PropertyValue Property="Supported">
<Bool>false</Bool>
</PropertyValue>
</Record>
</PropertyValue>
<PropertyValue Property="UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable">
<Bool>false</Bool>
</PropertyValue>
</Record>
</PropertyValue>
<PropertyValue Property="DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable">
<Bool>false</Bool>
</PropertyValue>
</Record>
</PropertyValue>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>