frodata 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. checksums.yaml +7 -0
  2. data/.autotest +2 -0
  3. data/.gitignore +24 -0
  4. data/.rspec +2 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +75 -0
  8. data/CHANGELOG.md +150 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE.txt +23 -0
  11. data/README.md +427 -0
  12. data/Rakefile +7 -0
  13. data/TODO.md +55 -0
  14. data/frodata.gemspec +34 -0
  15. data/lib/frodata.rb +36 -0
  16. data/lib/frodata/entity.rb +332 -0
  17. data/lib/frodata/entity_container.rb +75 -0
  18. data/lib/frodata/entity_set.rb +161 -0
  19. data/lib/frodata/errors.rb +68 -0
  20. data/lib/frodata/navigation_property.rb +29 -0
  21. data/lib/frodata/navigation_property/proxy.rb +80 -0
  22. data/lib/frodata/properties.rb +32 -0
  23. data/lib/frodata/properties/binary.rb +50 -0
  24. data/lib/frodata/properties/boolean.rb +37 -0
  25. data/lib/frodata/properties/collection.rb +50 -0
  26. data/lib/frodata/properties/complex.rb +114 -0
  27. data/lib/frodata/properties/date.rb +27 -0
  28. data/lib/frodata/properties/date_time.rb +83 -0
  29. data/lib/frodata/properties/date_time_offset.rb +17 -0
  30. data/lib/frodata/properties/decimal.rb +50 -0
  31. data/lib/frodata/properties/enum.rb +62 -0
  32. data/lib/frodata/properties/float.rb +67 -0
  33. data/lib/frodata/properties/geography.rb +13 -0
  34. data/lib/frodata/properties/geography/base.rb +162 -0
  35. data/lib/frodata/properties/geography/line_string.rb +33 -0
  36. data/lib/frodata/properties/geography/point.rb +31 -0
  37. data/lib/frodata/properties/geography/polygon.rb +38 -0
  38. data/lib/frodata/properties/guid.rb +17 -0
  39. data/lib/frodata/properties/integer.rb +107 -0
  40. data/lib/frodata/properties/number.rb +14 -0
  41. data/lib/frodata/properties/string.rb +72 -0
  42. data/lib/frodata/properties/time.rb +40 -0
  43. data/lib/frodata/properties/time_of_day.rb +27 -0
  44. data/lib/frodata/property.rb +139 -0
  45. data/lib/frodata/property_registry.rb +41 -0
  46. data/lib/frodata/query.rb +233 -0
  47. data/lib/frodata/query/criteria.rb +92 -0
  48. data/lib/frodata/query/criteria/comparison_operators.rb +49 -0
  49. data/lib/frodata/query/criteria/date_functions.rb +61 -0
  50. data/lib/frodata/query/criteria/geography_functions.rb +21 -0
  51. data/lib/frodata/query/criteria/lambda_operators.rb +27 -0
  52. data/lib/frodata/query/criteria/string_functions.rb +40 -0
  53. data/lib/frodata/query/in_batches.rb +58 -0
  54. data/lib/frodata/railtie.rb +19 -0
  55. data/lib/frodata/schema.rb +155 -0
  56. data/lib/frodata/schema/complex_type.rb +79 -0
  57. data/lib/frodata/schema/enum_type.rb +95 -0
  58. data/lib/frodata/service.rb +254 -0
  59. data/lib/frodata/service/request.rb +85 -0
  60. data/lib/frodata/service/response.rb +162 -0
  61. data/lib/frodata/service/response/atom.rb +40 -0
  62. data/lib/frodata/service/response/json.rb +41 -0
  63. data/lib/frodata/service/response/plain.rb +36 -0
  64. data/lib/frodata/service/response/xml.rb +40 -0
  65. data/lib/frodata/service_registry.rb +52 -0
  66. data/lib/frodata/version.rb +3 -0
  67. data/spec/fixtures/files/entity_to_xml.xml +17 -0
  68. data/spec/fixtures/files/error.xml +5 -0
  69. data/spec/fixtures/files/metadata.xml +150 -0
  70. data/spec/fixtures/files/product_0.json +10 -0
  71. data/spec/fixtures/files/product_0.xml +28 -0
  72. data/spec/fixtures/files/products.json +106 -0
  73. data/spec/fixtures/files/products.xml +308 -0
  74. data/spec/fixtures/files/supplier_0.json +26 -0
  75. data/spec/fixtures/files/supplier_0.xml +32 -0
  76. data/spec/fixtures/vcr_cassettes/entity_set_specs.yml +1635 -0
  77. data/spec/fixtures/vcr_cassettes/entity_set_specs/bad_entry.yml +183 -0
  78. data/spec/fixtures/vcr_cassettes/entity_set_specs/existing_entry.yml +256 -0
  79. data/spec/fixtures/vcr_cassettes/entity_set_specs/new_entry.yml +185 -0
  80. data/spec/fixtures/vcr_cassettes/entity_specs.yml +285 -0
  81. data/spec/fixtures/vcr_cassettes/navigation_property_proxy_specs.yml +346 -0
  82. data/spec/fixtures/vcr_cassettes/query/result_specs.yml +189 -0
  83. data/spec/fixtures/vcr_cassettes/query_specs.yml +1060 -0
  84. data/spec/fixtures/vcr_cassettes/schema/complex_type_specs.yml +127 -0
  85. data/spec/fixtures/vcr_cassettes/service/request_specs.yml +193 -0
  86. data/spec/fixtures/vcr_cassettes/service_registry_specs.yml +129 -0
  87. data/spec/fixtures/vcr_cassettes/service_specs.yml +127 -0
  88. data/spec/fixtures/vcr_cassettes/usage_example_specs.yml +1330 -0
  89. data/spec/frodata/entity/shared_examples.rb +82 -0
  90. data/spec/frodata/entity_container_spec.rb +38 -0
  91. data/spec/frodata/entity_set_spec.rb +168 -0
  92. data/spec/frodata/entity_spec.rb +151 -0
  93. data/spec/frodata/errors_spec.rb +48 -0
  94. data/spec/frodata/navigation_property/proxy_spec.rb +44 -0
  95. data/spec/frodata/navigation_property_spec.rb +55 -0
  96. data/spec/frodata/properties/binary_spec.rb +50 -0
  97. data/spec/frodata/properties/boolean_spec.rb +72 -0
  98. data/spec/frodata/properties/collection_spec.rb +44 -0
  99. data/spec/frodata/properties/date_spec.rb +23 -0
  100. data/spec/frodata/properties/date_time_offset_spec.rb +30 -0
  101. data/spec/frodata/properties/date_time_spec.rb +23 -0
  102. data/spec/frodata/properties/decimal_spec.rb +51 -0
  103. data/spec/frodata/properties/float_spec.rb +45 -0
  104. data/spec/frodata/properties/geography/line_string_spec.rb +33 -0
  105. data/spec/frodata/properties/geography/point_spec.rb +29 -0
  106. data/spec/frodata/properties/geography/polygon_spec.rb +55 -0
  107. data/spec/frodata/properties/geography/shared_examples.rb +72 -0
  108. data/spec/frodata/properties/guid_spec.rb +17 -0
  109. data/spec/frodata/properties/integer_spec.rb +58 -0
  110. data/spec/frodata/properties/string_spec.rb +46 -0
  111. data/spec/frodata/properties/time_of_day_spec.rb +23 -0
  112. data/spec/frodata/properties/time_spec.rb +15 -0
  113. data/spec/frodata/property_registry_spec.rb +16 -0
  114. data/spec/frodata/property_spec.rb +71 -0
  115. data/spec/frodata/query/criteria_spec.rb +229 -0
  116. data/spec/frodata/query_spec.rb +199 -0
  117. data/spec/frodata/schema/complex_type_spec.rb +96 -0
  118. data/spec/frodata/schema/enum_type_spec.rb +112 -0
  119. data/spec/frodata/schema_spec.rb +97 -0
  120. data/spec/frodata/service/request_spec.rb +49 -0
  121. data/spec/frodata/service/response_spec.rb +85 -0
  122. data/spec/frodata/service_registry_spec.rb +18 -0
  123. data/spec/frodata/service_spec.rb +191 -0
  124. data/spec/frodata/usage_example_spec.rb +188 -0
  125. data/spec/spec_helper.rb +32 -0
  126. data/spec/support/coverage.rb +2 -0
  127. data/spec/support/vcr.rb +9 -0
  128. metadata +401 -0
@@ -0,0 +1,285 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://services.odata.org/V4/OData/OData.svc/$metadata
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Typhoeus - https://github.com/typhoeus/typhoeus
12
+ DataServiceVersion:
13
+ - '3.0'
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Cache-Control:
20
+ - no-cache
21
+ Content-Length:
22
+ - '6742'
23
+ Content-Type:
24
+ - application/xml;charset=utf-8
25
+ Server:
26
+ - Microsoft-IIS/8.0
27
+ X-Content-Type-Options:
28
+ - nosniff
29
+ OData-Version:
30
+ - 4.0;
31
+ X-AspNet-Version:
32
+ - 4.0.30319
33
+ X-Powered-By:
34
+ - ASP.NET
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ Access-Control-Allow-Methods:
38
+ - GET
39
+ Access-Control-Allow-Headers:
40
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
41
+ Access-Control-Expose-Headers:
42
+ - DataServiceVersion
43
+ Date:
44
+ - Wed, 22 Nov 2017 22:11:38 GMT
45
+ body:
46
+ encoding: UTF-8
47
+ string: <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices><Schema
48
+ Namespace="ODataDemo" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType
49
+ Name="Product"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int32"
50
+ Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description"
51
+ Type="Edm.String" /><Property Name="ReleaseDate" Type="Edm.DateTimeOffset"
52
+ Nullable="false" /><Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset"
53
+ /><Property Name="Rating" Type="Edm.Int16" Nullable="false" /><Property Name="Price"
54
+ Type="Edm.Double" Nullable="false" /><NavigationProperty Name="Categories"
55
+ Type="Collection(ODataDemo.Category)" Partner="Products" /><NavigationProperty
56
+ Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" /><NavigationProperty
57
+ Name="ProductDetail" Type="ODataDemo.ProductDetail" Partner="Product" /></EntityType><EntityType
58
+ Name="FeaturedProduct" BaseType="ODataDemo.Product"><NavigationProperty Name="Advertisement"
59
+ Type="ODataDemo.Advertisement" Partner="FeaturedProduct" /></EntityType><EntityType
60
+ Name="ProductDetail"><Key><PropertyRef Name="ProductID" /></Key><Property
61
+ Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="Details"
62
+ Type="Edm.String" /><NavigationProperty Name="Product" Type="ODataDemo.Product"
63
+ Partner="ProductDetail" /></EntityType><EntityType Name="Category" OpenType="true"><Key><PropertyRef
64
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
65
+ Name="Name" Type="Edm.String" /><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
66
+ Partner="Categories" /></EntityType><EntityType Name="Supplier"><Key><PropertyRef
67
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
68
+ Name="Name" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
69
+ /><Property Name="Location" Type="Edm.GeographyPoint" SRID="Variable" /><Property
70
+ Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed" Nullable="false"
71
+ /><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
72
+ Partner="Supplier" /></EntityType><ComplexType Name="Address"><Property Name="Street"
73
+ Type="Edm.String" /><Property Name="City" Type="Edm.String" /><Property Name="State"
74
+ Type="Edm.String" /><Property Name="ZipCode" Type="Edm.String" /><Property
75
+ Name="Country" Type="Edm.String" /></ComplexType><EntityType Name="Person"><Key><PropertyRef
76
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
77
+ Name="Name" Type="Edm.String" /><NavigationProperty Name="PersonDetail" Type="ODataDemo.PersonDetail"
78
+ Partner="Person" /></EntityType><EntityType Name="Customer" BaseType="ODataDemo.Person"><Property
79
+ Name="TotalExpense" Type="Edm.Decimal" Nullable="false" /></EntityType><EntityType
80
+ Name="Employee" BaseType="ODataDemo.Person"><Property Name="EmployeeID" Type="Edm.Int64"
81
+ Nullable="false" /><Property Name="HireDate" Type="Edm.DateTimeOffset" Nullable="false"
82
+ /><Property Name="Salary" Type="Edm.Single" Nullable="false" /></EntityType><EntityType
83
+ Name="PersonDetail"><Key><PropertyRef Name="PersonID" /></Key><Property Name="PersonID"
84
+ Type="Edm.Int32" Nullable="false" /><Property Name="Age" Type="Edm.Byte" Nullable="false"
85
+ /><Property Name="Gender" Type="Edm.Boolean" Nullable="false" /><Property
86
+ Name="Phone" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
87
+ /><Property Name="Photo" Type="Edm.Stream" Nullable="false" /><NavigationProperty
88
+ Name="Person" Type="ODataDemo.Person" Partner="PersonDetail" /></EntityType><EntityType
89
+ Name="Advertisement" HasStream="true"><Key><PropertyRef Name="ID" /></Key><Property
90
+ Name="ID" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String"
91
+ /><Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" /><NavigationProperty
92
+ Name="FeaturedProduct" Type="ODataDemo.FeaturedProduct" Partner="Advertisement"
93
+ /></EntityType><EntityContainer Name="DemoService"><EntitySet Name="Products"
94
+ EntityType="ODataDemo.Product"><NavigationPropertyBinding Path="ODataDemo.FeaturedProduct/Advertisement"
95
+ Target="Advertisements" /><NavigationPropertyBinding Path="Categories" Target="Categories"
96
+ /><NavigationPropertyBinding Path="Supplier" Target="Suppliers" /><NavigationPropertyBinding
97
+ Path="ProductDetail" Target="ProductDetails" /></EntitySet><EntitySet Name="ProductDetails"
98
+ EntityType="ODataDemo.ProductDetail"><NavigationPropertyBinding Path="Product"
99
+ Target="Products" /></EntitySet><EntitySet Name="Categories" EntityType="ODataDemo.Category"><NavigationPropertyBinding
100
+ Path="Products" Target="Products" /></EntitySet><EntitySet Name="Suppliers"
101
+ EntityType="ODataDemo.Supplier"><NavigationPropertyBinding Path="Products"
102
+ Target="Products" /></EntitySet><EntitySet Name="Persons" EntityType="ODataDemo.Person"><NavigationPropertyBinding
103
+ Path="PersonDetail" Target="PersonDetails" /></EntitySet><EntitySet Name="PersonDetails"
104
+ EntityType="ODataDemo.PersonDetail"><NavigationPropertyBinding Path="Person"
105
+ Target="Persons" /></EntitySet><EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement"><NavigationPropertyBinding
106
+ Path="FeaturedProduct" Target="Products" /></EntitySet></EntityContainer><Annotations
107
+ Target="ODataDemo.DemoService"><Annotation Term="Org.OData.Display.V1.Description"
108
+ String="This is a sample OData service with vocabularies" /></Annotations><Annotations
109
+ Target="ODataDemo.Product"><Annotation Term="Org.OData.Display.V1.Description"
110
+ String="All Products available in the online store" /></Annotations><Annotations
111
+ Target="ODataDemo.Product/Name"><Annotation Term="Org.OData.Display.V1.DisplayName"
112
+ String="Product Name" /></Annotations><Annotations Target="ODataDemo.DemoService/Suppliers"><Annotation
113
+ Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." /><Annotation
114
+ Term="Org.OData.Publication.V1.PublisherId" String="MSFT" /><Annotation Term="Org.OData.Publication.V1.Keywords"
115
+ String="Inventory, Supplier, Advertisers, Sales, Finance" /><Annotation Term="Org.OData.Publication.V1.AttributionUrl"
116
+ String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.AttributionDescription"
117
+ String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.DocumentationUrl
118
+ " String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.TermsOfUseUrl"
119
+ String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl"
120
+ String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.LastModified"
121
+ String="4/2/2013" /><Annotation Term="Org.OData.Publication.V1.ImageUrl "
122
+ String="http://www.odata.org/" /></Annotations></Schema></edmx:DataServices></edmx:Edmx>
123
+ http_version: '1.1'
124
+ adapter_metadata:
125
+ effective_url: http://services.odata.org/V4/OData/OData.svc/$metadata
126
+ recorded_at: Wed, 22 Nov 2017 22:11:41 GMT
127
+ - request:
128
+ method: get
129
+ uri: http://services.odata.org/V4/OData/OData.svc/Products(0)/ProductDetail
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ User-Agent:
135
+ - Typhoeus - https://github.com/typhoeus/typhoeus
136
+ OData-Version:
137
+ - '4.0'
138
+ Accept:
139
+ - application/atom+xml,application/json,text/plain
140
+ Expect:
141
+ - ''
142
+ response:
143
+ status:
144
+ code: 204
145
+ message: No Content
146
+ headers:
147
+ Cache-Control:
148
+ - no-cache
149
+ Server:
150
+ - Microsoft-IIS/10.0
151
+ X-Content-Type-Options:
152
+ - nosniff
153
+ OData-Version:
154
+ - 4.0;
155
+ X-AspNet-Version:
156
+ - 4.0.30319
157
+ X-Powered-By:
158
+ - ASP.NET
159
+ Access-Control-Allow-Origin:
160
+ - "*"
161
+ Access-Control-Allow-Methods:
162
+ - GET
163
+ Access-Control-Allow-Headers:
164
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
165
+ Access-Control-Expose-Headers:
166
+ - DataServiceVersion
167
+ Date:
168
+ - Tue, 16 Jan 2018 20:30:35 GMT
169
+ body:
170
+ encoding: UTF-8
171
+ string: ''
172
+ http_version: '1.1'
173
+ adapter_metadata:
174
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products(0)/ProductDetail
175
+ recorded_at: Tue, 16 Jan 2018 20:30:36 GMT
176
+ - request:
177
+ method: get
178
+ uri: http://services.odata.org/V4/OData/OData.svc/Products(0)/Supplier
179
+ body:
180
+ encoding: US-ASCII
181
+ string: ''
182
+ headers:
183
+ User-Agent:
184
+ - Typhoeus - https://github.com/typhoeus/typhoeus
185
+ OData-Version:
186
+ - '4.0'
187
+ Accept:
188
+ - application/atom+xml,application/json,text/plain
189
+ Expect:
190
+ - ''
191
+ response:
192
+ status:
193
+ code: 200
194
+ message: OK
195
+ headers:
196
+ Cache-Control:
197
+ - no-cache
198
+ Content-Length:
199
+ - '369'
200
+ Content-Type:
201
+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
202
+ ETag:
203
+ - W/"0"
204
+ Server:
205
+ - Microsoft-IIS/10.0
206
+ X-Content-Type-Options:
207
+ - nosniff
208
+ OData-Version:
209
+ - 4.0;
210
+ X-AspNet-Version:
211
+ - 4.0.30319
212
+ X-Powered-By:
213
+ - ASP.NET
214
+ Access-Control-Allow-Origin:
215
+ - "*"
216
+ Access-Control-Allow-Methods:
217
+ - GET
218
+ Access-Control-Allow-Headers:
219
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
220
+ Access-Control-Expose-Headers:
221
+ - DataServiceVersion
222
+ Date:
223
+ - Tue, 16 Jan 2018 20:30:35 GMT
224
+ body:
225
+ encoding: UTF-8
226
+ string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Suppliers/$entity","ID":1,"Name":"Tokyo
227
+ Traders","Address":{"Street":"NE 40th","City":"Redmond","State":"WA","ZipCode":"98052","Country":"USA"},"Location":{"type":"Point","coordinates":[-122.107711791992,47.6472206115723],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Concurrency":0}'
228
+ http_version: '1.1'
229
+ adapter_metadata:
230
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products(0)/Supplier
231
+ recorded_at: Tue, 16 Jan 2018 20:30:36 GMT
232
+ - request:
233
+ method: get
234
+ uri: http://services.odata.org/V4/OData/OData.svc/Products(0)/Categories
235
+ body:
236
+ encoding: US-ASCII
237
+ string: ''
238
+ headers:
239
+ User-Agent:
240
+ - Typhoeus - https://github.com/typhoeus/typhoeus
241
+ OData-Version:
242
+ - '4.0'
243
+ Accept:
244
+ - application/atom+xml,application/json,text/plain
245
+ Expect:
246
+ - ''
247
+ response:
248
+ status:
249
+ code: 200
250
+ message: OK
251
+ headers:
252
+ Cache-Control:
253
+ - no-cache
254
+ Content-Length:
255
+ - '119'
256
+ Content-Type:
257
+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
258
+ Server:
259
+ - Microsoft-IIS/10.0
260
+ X-Content-Type-Options:
261
+ - nosniff
262
+ OData-Version:
263
+ - 4.0;
264
+ X-AspNet-Version:
265
+ - 4.0.30319
266
+ X-Powered-By:
267
+ - ASP.NET
268
+ Access-Control-Allow-Origin:
269
+ - "*"
270
+ Access-Control-Allow-Methods:
271
+ - GET
272
+ Access-Control-Allow-Headers:
273
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
274
+ Access-Control-Expose-Headers:
275
+ - DataServiceVersion
276
+ Date:
277
+ - Tue, 16 Jan 2018 20:30:35 GMT
278
+ body:
279
+ encoding: UTF-8
280
+ string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Categories","value":[{"ID":0,"Name":"Food"}]}'
281
+ http_version: '1.1'
282
+ adapter_metadata:
283
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products(0)/Categories
284
+ recorded_at: Tue, 16 Jan 2018 20:30:36 GMT
285
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,346 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://services.odata.org/V4/OData/OData.svc/$metadata
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Typhoeus - https://github.com/typhoeus/typhoeus
12
+ OData-Version:
13
+ - '4.0'
14
+ Expect:
15
+ - ''
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Cache-Control:
22
+ - no-cache
23
+ Content-Length:
24
+ - '6742'
25
+ Content-Type:
26
+ - application/xml;charset=utf-8
27
+ Server:
28
+ - Microsoft-IIS/10.0
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ OData-Version:
32
+ - 4.0;
33
+ X-AspNet-Version:
34
+ - 4.0.30319
35
+ X-Powered-By:
36
+ - ASP.NET
37
+ Access-Control-Allow-Origin:
38
+ - "*"
39
+ Access-Control-Allow-Methods:
40
+ - GET
41
+ Access-Control-Allow-Headers:
42
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
43
+ Access-Control-Expose-Headers:
44
+ - DataServiceVersion
45
+ Date:
46
+ - Tue, 16 Jan 2018 20:31:42 GMT
47
+ body:
48
+ encoding: UTF-8
49
+ string: <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices><Schema
50
+ Namespace="ODataDemo" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType
51
+ Name="Product"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int32"
52
+ Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description"
53
+ Type="Edm.String" /><Property Name="ReleaseDate" Type="Edm.DateTimeOffset"
54
+ Nullable="false" /><Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset"
55
+ /><Property Name="Rating" Type="Edm.Int16" Nullable="false" /><Property Name="Price"
56
+ Type="Edm.Double" Nullable="false" /><NavigationProperty Name="Categories"
57
+ Type="Collection(ODataDemo.Category)" Partner="Products" /><NavigationProperty
58
+ Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" /><NavigationProperty
59
+ Name="ProductDetail" Type="ODataDemo.ProductDetail" Partner="Product" /></EntityType><EntityType
60
+ Name="FeaturedProduct" BaseType="ODataDemo.Product"><NavigationProperty Name="Advertisement"
61
+ Type="ODataDemo.Advertisement" Partner="FeaturedProduct" /></EntityType><EntityType
62
+ Name="ProductDetail"><Key><PropertyRef Name="ProductID" /></Key><Property
63
+ Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="Details"
64
+ Type="Edm.String" /><NavigationProperty Name="Product" Type="ODataDemo.Product"
65
+ Partner="ProductDetail" /></EntityType><EntityType Name="Category" OpenType="true"><Key><PropertyRef
66
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
67
+ Name="Name" Type="Edm.String" /><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
68
+ Partner="Categories" /></EntityType><EntityType Name="Supplier"><Key><PropertyRef
69
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
70
+ Name="Name" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
71
+ /><Property Name="Location" Type="Edm.GeographyPoint" SRID="Variable" /><Property
72
+ Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed" Nullable="false"
73
+ /><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
74
+ Partner="Supplier" /></EntityType><ComplexType Name="Address"><Property Name="Street"
75
+ Type="Edm.String" /><Property Name="City" Type="Edm.String" /><Property Name="State"
76
+ Type="Edm.String" /><Property Name="ZipCode" Type="Edm.String" /><Property
77
+ Name="Country" Type="Edm.String" /></ComplexType><EntityType Name="Person"><Key><PropertyRef
78
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
79
+ Name="Name" Type="Edm.String" /><NavigationProperty Name="PersonDetail" Type="ODataDemo.PersonDetail"
80
+ Partner="Person" /></EntityType><EntityType Name="Customer" BaseType="ODataDemo.Person"><Property
81
+ Name="TotalExpense" Type="Edm.Decimal" Nullable="false" /></EntityType><EntityType
82
+ Name="Employee" BaseType="ODataDemo.Person"><Property Name="EmployeeID" Type="Edm.Int64"
83
+ Nullable="false" /><Property Name="HireDate" Type="Edm.DateTimeOffset" Nullable="false"
84
+ /><Property Name="Salary" Type="Edm.Single" Nullable="false" /></EntityType><EntityType
85
+ Name="PersonDetail"><Key><PropertyRef Name="PersonID" /></Key><Property Name="PersonID"
86
+ Type="Edm.Int32" Nullable="false" /><Property Name="Age" Type="Edm.Byte" Nullable="false"
87
+ /><Property Name="Gender" Type="Edm.Boolean" Nullable="false" /><Property
88
+ Name="Phone" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
89
+ /><Property Name="Photo" Type="Edm.Stream" Nullable="false" /><NavigationProperty
90
+ Name="Person" Type="ODataDemo.Person" Partner="PersonDetail" /></EntityType><EntityType
91
+ Name="Advertisement" HasStream="true"><Key><PropertyRef Name="ID" /></Key><Property
92
+ Name="ID" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String"
93
+ /><Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" /><NavigationProperty
94
+ Name="FeaturedProduct" Type="ODataDemo.FeaturedProduct" Partner="Advertisement"
95
+ /></EntityType><EntityContainer Name="DemoService"><EntitySet Name="Products"
96
+ EntityType="ODataDemo.Product"><NavigationPropertyBinding Path="ODataDemo.FeaturedProduct/Advertisement"
97
+ Target="Advertisements" /><NavigationPropertyBinding Path="Categories" Target="Categories"
98
+ /><NavigationPropertyBinding Path="Supplier" Target="Suppliers" /><NavigationPropertyBinding
99
+ Path="ProductDetail" Target="ProductDetails" /></EntitySet><EntitySet Name="ProductDetails"
100
+ EntityType="ODataDemo.ProductDetail"><NavigationPropertyBinding Path="Product"
101
+ Target="Products" /></EntitySet><EntitySet Name="Categories" EntityType="ODataDemo.Category"><NavigationPropertyBinding
102
+ Path="Products" Target="Products" /></EntitySet><EntitySet Name="Suppliers"
103
+ EntityType="ODataDemo.Supplier"><NavigationPropertyBinding Path="Products"
104
+ Target="Products" /></EntitySet><EntitySet Name="Persons" EntityType="ODataDemo.Person"><NavigationPropertyBinding
105
+ Path="PersonDetail" Target="PersonDetails" /></EntitySet><EntitySet Name="PersonDetails"
106
+ EntityType="ODataDemo.PersonDetail"><NavigationPropertyBinding Path="Person"
107
+ Target="Persons" /></EntitySet><EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement"><NavigationPropertyBinding
108
+ Path="FeaturedProduct" Target="Products" /></EntitySet></EntityContainer><Annotations
109
+ Target="ODataDemo.DemoService"><Annotation Term="Org.OData.Display.V1.Description"
110
+ String="This is a sample OData service with vocabularies" /></Annotations><Annotations
111
+ Target="ODataDemo.Product"><Annotation Term="Org.OData.Display.V1.Description"
112
+ String="All Products available in the online store" /></Annotations><Annotations
113
+ Target="ODataDemo.Product/Name"><Annotation Term="Org.OData.Display.V1.DisplayName"
114
+ String="Product Name" /></Annotations><Annotations Target="ODataDemo.DemoService/Suppliers"><Annotation
115
+ Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." /><Annotation
116
+ Term="Org.OData.Publication.V1.PublisherId" String="MSFT" /><Annotation Term="Org.OData.Publication.V1.Keywords"
117
+ String="Inventory, Supplier, Advertisers, Sales, Finance" /><Annotation Term="Org.OData.Publication.V1.AttributionUrl"
118
+ String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.AttributionDescription"
119
+ String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.DocumentationUrl
120
+ " String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.TermsOfUseUrl"
121
+ String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl"
122
+ String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.LastModified"
123
+ String="4/2/2013" /><Annotation Term="Org.OData.Publication.V1.ImageUrl "
124
+ String="http://www.odata.org/" /></Annotations></Schema></edmx:DataServices></edmx:Edmx>
125
+ http_version: '1.1'
126
+ adapter_metadata:
127
+ effective_url: http://services.odata.org/V4/OData/OData.svc/$metadata
128
+ recorded_at: Tue, 16 Jan 2018 20:31:43 GMT
129
+ - request:
130
+ method: get
131
+ uri: http://services.odata.org/V4/OData/OData.svc/Products(1)
132
+ body:
133
+ encoding: US-ASCII
134
+ string: ''
135
+ headers:
136
+ User-Agent:
137
+ - Typhoeus - https://github.com/typhoeus/typhoeus
138
+ OData-Version:
139
+ - '4.0'
140
+ Accept:
141
+ - application/atom+xml,application/json,text/plain
142
+ Expect:
143
+ - ''
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Cache-Control:
150
+ - no-cache
151
+ Content-Length:
152
+ - '226'
153
+ Content-Type:
154
+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
155
+ Server:
156
+ - Microsoft-IIS/10.0
157
+ X-Content-Type-Options:
158
+ - nosniff
159
+ OData-Version:
160
+ - 4.0;
161
+ X-AspNet-Version:
162
+ - 4.0.30319
163
+ X-Powered-By:
164
+ - ASP.NET
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET
169
+ Access-Control-Allow-Headers:
170
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
171
+ Access-Control-Expose-Headers:
172
+ - DataServiceVersion
173
+ Date:
174
+ - Tue, 16 Jan 2018 20:31:42 GMT
175
+ body:
176
+ encoding: UTF-8
177
+ string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products/$entity","ID":1,"Name":"Milk","Description":"Low
178
+ fat milk","ReleaseDate":"1995-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":3.5}'
179
+ http_version: '1.1'
180
+ adapter_metadata:
181
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products(1)
182
+ recorded_at: Tue, 16 Jan 2018 20:31:43 GMT
183
+ - request:
184
+ method: get
185
+ uri: http://services.odata.org/V4/OData/OData.svc/Products(1)/Supplier
186
+ body:
187
+ encoding: US-ASCII
188
+ string: ''
189
+ headers:
190
+ User-Agent:
191
+ - Typhoeus - https://github.com/typhoeus/typhoeus
192
+ OData-Version:
193
+ - '4.0'
194
+ Accept:
195
+ - application/atom+xml,application/json,text/plain
196
+ Expect:
197
+ - ''
198
+ response:
199
+ status:
200
+ code: 200
201
+ message: OK
202
+ headers:
203
+ Cache-Control:
204
+ - no-cache
205
+ Content-Length:
206
+ - '372'
207
+ Content-Type:
208
+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
209
+ ETag:
210
+ - W/"0"
211
+ Server:
212
+ - Microsoft-IIS/10.0
213
+ X-Content-Type-Options:
214
+ - nosniff
215
+ OData-Version:
216
+ - 4.0;
217
+ X-AspNet-Version:
218
+ - 4.0.30319
219
+ X-Powered-By:
220
+ - ASP.NET
221
+ Access-Control-Allow-Origin:
222
+ - "*"
223
+ Access-Control-Allow-Methods:
224
+ - GET
225
+ Access-Control-Allow-Headers:
226
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
227
+ Access-Control-Expose-Headers:
228
+ - DataServiceVersion
229
+ Date:
230
+ - Tue, 16 Jan 2018 20:31:42 GMT
231
+ body:
232
+ encoding: UTF-8
233
+ string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Suppliers/$entity","ID":0,"Name":"Exotic
234
+ Liquids","Address":{"Street":"NE 228th","City":"Sammamish","State":"WA","ZipCode":"98074","Country":"USA"},"Location":{"type":"Point","coordinates":[-122.03547668457,47.6316604614258],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Concurrency":0}'
235
+ http_version: '1.1'
236
+ adapter_metadata:
237
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products(1)/Supplier
238
+ recorded_at: Tue, 16 Jan 2018 20:31:43 GMT
239
+ - request:
240
+ method: get
241
+ uri: http://services.odata.org/V4/OData/OData.svc/Products(1)/ProductDetail
242
+ body:
243
+ encoding: US-ASCII
244
+ string: ''
245
+ headers:
246
+ User-Agent:
247
+ - Typhoeus - https://github.com/typhoeus/typhoeus
248
+ OData-Version:
249
+ - '4.0'
250
+ Accept:
251
+ - application/atom+xml,application/json,text/plain
252
+ Expect:
253
+ - ''
254
+ response:
255
+ status:
256
+ code: 200
257
+ message: OK
258
+ headers:
259
+ Cache-Control:
260
+ - no-cache
261
+ Content-Length:
262
+ - '145'
263
+ Content-Type:
264
+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
265
+ Server:
266
+ - Microsoft-IIS/10.0
267
+ X-Content-Type-Options:
268
+ - nosniff
269
+ OData-Version:
270
+ - 4.0;
271
+ X-AspNet-Version:
272
+ - 4.0.30319
273
+ X-Powered-By:
274
+ - ASP.NET
275
+ Access-Control-Allow-Origin:
276
+ - "*"
277
+ Access-Control-Allow-Methods:
278
+ - GET
279
+ Access-Control-Allow-Headers:
280
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
281
+ Access-Control-Expose-Headers:
282
+ - DataServiceVersion
283
+ Date:
284
+ - Tue, 16 Jan 2018 20:31:43 GMT
285
+ body:
286
+ encoding: UTF-8
287
+ string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#ProductDetails/$entity","ProductID":1,"Details":"Details
288
+ of product 1"}'
289
+ http_version: '1.1'
290
+ adapter_metadata:
291
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products(1)/ProductDetail
292
+ recorded_at: Tue, 16 Jan 2018 20:31:43 GMT
293
+ - request:
294
+ method: get
295
+ uri: http://services.odata.org/V4/OData/OData.svc/Products(1)/Categories
296
+ body:
297
+ encoding: US-ASCII
298
+ string: ''
299
+ headers:
300
+ User-Agent:
301
+ - Typhoeus - https://github.com/typhoeus/typhoeus
302
+ OData-Version:
303
+ - '4.0'
304
+ Accept:
305
+ - application/atom+xml,application/json,text/plain
306
+ Expect:
307
+ - ''
308
+ response:
309
+ status:
310
+ code: 200
311
+ message: OK
312
+ headers:
313
+ Cache-Control:
314
+ - no-cache
315
+ Content-Length:
316
+ - '147'
317
+ Content-Type:
318
+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
319
+ Server:
320
+ - Microsoft-IIS/10.0
321
+ X-Content-Type-Options:
322
+ - nosniff
323
+ OData-Version:
324
+ - 4.0;
325
+ X-AspNet-Version:
326
+ - 4.0.30319
327
+ X-Powered-By:
328
+ - ASP.NET
329
+ Access-Control-Allow-Origin:
330
+ - "*"
331
+ Access-Control-Allow-Methods:
332
+ - GET
333
+ Access-Control-Allow-Headers:
334
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
335
+ Access-Control-Expose-Headers:
336
+ - DataServiceVersion
337
+ Date:
338
+ - Tue, 16 Jan 2018 20:31:43 GMT
339
+ body:
340
+ encoding: UTF-8
341
+ string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Categories","value":[{"ID":0,"Name":"Food"},{"ID":1,"Name":"Beverages"}]}'
342
+ http_version: '1.1'
343
+ adapter_metadata:
344
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products(1)/Categories
345
+ recorded_at: Tue, 16 Jan 2018 20:31:43 GMT
346
+ recorded_with: VCR 2.9.3