frodata 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.autotest +2 -0
- data/.gitignore +24 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +75 -0
- data/CHANGELOG.md +150 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +23 -0
- data/README.md +427 -0
- data/Rakefile +7 -0
- data/TODO.md +55 -0
- data/frodata.gemspec +34 -0
- data/lib/frodata.rb +36 -0
- data/lib/frodata/entity.rb +332 -0
- data/lib/frodata/entity_container.rb +75 -0
- data/lib/frodata/entity_set.rb +161 -0
- data/lib/frodata/errors.rb +68 -0
- data/lib/frodata/navigation_property.rb +29 -0
- data/lib/frodata/navigation_property/proxy.rb +80 -0
- data/lib/frodata/properties.rb +32 -0
- data/lib/frodata/properties/binary.rb +50 -0
- data/lib/frodata/properties/boolean.rb +37 -0
- data/lib/frodata/properties/collection.rb +50 -0
- data/lib/frodata/properties/complex.rb +114 -0
- data/lib/frodata/properties/date.rb +27 -0
- data/lib/frodata/properties/date_time.rb +83 -0
- data/lib/frodata/properties/date_time_offset.rb +17 -0
- data/lib/frodata/properties/decimal.rb +50 -0
- data/lib/frodata/properties/enum.rb +62 -0
- data/lib/frodata/properties/float.rb +67 -0
- data/lib/frodata/properties/geography.rb +13 -0
- data/lib/frodata/properties/geography/base.rb +162 -0
- data/lib/frodata/properties/geography/line_string.rb +33 -0
- data/lib/frodata/properties/geography/point.rb +31 -0
- data/lib/frodata/properties/geography/polygon.rb +38 -0
- data/lib/frodata/properties/guid.rb +17 -0
- data/lib/frodata/properties/integer.rb +107 -0
- data/lib/frodata/properties/number.rb +14 -0
- data/lib/frodata/properties/string.rb +72 -0
- data/lib/frodata/properties/time.rb +40 -0
- data/lib/frodata/properties/time_of_day.rb +27 -0
- data/lib/frodata/property.rb +139 -0
- data/lib/frodata/property_registry.rb +41 -0
- data/lib/frodata/query.rb +233 -0
- data/lib/frodata/query/criteria.rb +92 -0
- data/lib/frodata/query/criteria/comparison_operators.rb +49 -0
- data/lib/frodata/query/criteria/date_functions.rb +61 -0
- data/lib/frodata/query/criteria/geography_functions.rb +21 -0
- data/lib/frodata/query/criteria/lambda_operators.rb +27 -0
- data/lib/frodata/query/criteria/string_functions.rb +40 -0
- data/lib/frodata/query/in_batches.rb +58 -0
- data/lib/frodata/railtie.rb +19 -0
- data/lib/frodata/schema.rb +155 -0
- data/lib/frodata/schema/complex_type.rb +79 -0
- data/lib/frodata/schema/enum_type.rb +95 -0
- data/lib/frodata/service.rb +254 -0
- data/lib/frodata/service/request.rb +85 -0
- data/lib/frodata/service/response.rb +162 -0
- data/lib/frodata/service/response/atom.rb +40 -0
- data/lib/frodata/service/response/json.rb +41 -0
- data/lib/frodata/service/response/plain.rb +36 -0
- data/lib/frodata/service/response/xml.rb +40 -0
- data/lib/frodata/service_registry.rb +52 -0
- data/lib/frodata/version.rb +3 -0
- data/spec/fixtures/files/entity_to_xml.xml +17 -0
- data/spec/fixtures/files/error.xml +5 -0
- data/spec/fixtures/files/metadata.xml +150 -0
- data/spec/fixtures/files/product_0.json +10 -0
- data/spec/fixtures/files/product_0.xml +28 -0
- data/spec/fixtures/files/products.json +106 -0
- data/spec/fixtures/files/products.xml +308 -0
- data/spec/fixtures/files/supplier_0.json +26 -0
- data/spec/fixtures/files/supplier_0.xml +32 -0
- data/spec/fixtures/vcr_cassettes/entity_set_specs.yml +1635 -0
- data/spec/fixtures/vcr_cassettes/entity_set_specs/bad_entry.yml +183 -0
- data/spec/fixtures/vcr_cassettes/entity_set_specs/existing_entry.yml +256 -0
- data/spec/fixtures/vcr_cassettes/entity_set_specs/new_entry.yml +185 -0
- data/spec/fixtures/vcr_cassettes/entity_specs.yml +285 -0
- data/spec/fixtures/vcr_cassettes/navigation_property_proxy_specs.yml +346 -0
- data/spec/fixtures/vcr_cassettes/query/result_specs.yml +189 -0
- data/spec/fixtures/vcr_cassettes/query_specs.yml +1060 -0
- data/spec/fixtures/vcr_cassettes/schema/complex_type_specs.yml +127 -0
- data/spec/fixtures/vcr_cassettes/service/request_specs.yml +193 -0
- data/spec/fixtures/vcr_cassettes/service_registry_specs.yml +129 -0
- data/spec/fixtures/vcr_cassettes/service_specs.yml +127 -0
- data/spec/fixtures/vcr_cassettes/usage_example_specs.yml +1330 -0
- data/spec/frodata/entity/shared_examples.rb +82 -0
- data/spec/frodata/entity_container_spec.rb +38 -0
- data/spec/frodata/entity_set_spec.rb +168 -0
- data/spec/frodata/entity_spec.rb +151 -0
- data/spec/frodata/errors_spec.rb +48 -0
- data/spec/frodata/navigation_property/proxy_spec.rb +44 -0
- data/spec/frodata/navigation_property_spec.rb +55 -0
- data/spec/frodata/properties/binary_spec.rb +50 -0
- data/spec/frodata/properties/boolean_spec.rb +72 -0
- data/spec/frodata/properties/collection_spec.rb +44 -0
- data/spec/frodata/properties/date_spec.rb +23 -0
- data/spec/frodata/properties/date_time_offset_spec.rb +30 -0
- data/spec/frodata/properties/date_time_spec.rb +23 -0
- data/spec/frodata/properties/decimal_spec.rb +51 -0
- data/spec/frodata/properties/float_spec.rb +45 -0
- data/spec/frodata/properties/geography/line_string_spec.rb +33 -0
- data/spec/frodata/properties/geography/point_spec.rb +29 -0
- data/spec/frodata/properties/geography/polygon_spec.rb +55 -0
- data/spec/frodata/properties/geography/shared_examples.rb +72 -0
- data/spec/frodata/properties/guid_spec.rb +17 -0
- data/spec/frodata/properties/integer_spec.rb +58 -0
- data/spec/frodata/properties/string_spec.rb +46 -0
- data/spec/frodata/properties/time_of_day_spec.rb +23 -0
- data/spec/frodata/properties/time_spec.rb +15 -0
- data/spec/frodata/property_registry_spec.rb +16 -0
- data/spec/frodata/property_spec.rb +71 -0
- data/spec/frodata/query/criteria_spec.rb +229 -0
- data/spec/frodata/query_spec.rb +199 -0
- data/spec/frodata/schema/complex_type_spec.rb +96 -0
- data/spec/frodata/schema/enum_type_spec.rb +112 -0
- data/spec/frodata/schema_spec.rb +97 -0
- data/spec/frodata/service/request_spec.rb +49 -0
- data/spec/frodata/service/response_spec.rb +85 -0
- data/spec/frodata/service_registry_spec.rb +18 -0
- data/spec/frodata/service_spec.rb +191 -0
- data/spec/frodata/usage_example_spec.rb +188 -0
- data/spec/spec_helper.rb +32 -0
- data/spec/support/coverage.rb +2 -0
- data/spec/support/vcr.rb +9 -0
- metadata +401 -0
@@ -0,0 +1,183 @@
|
|
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
|
+
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, 29 Nov 2017 01:44:57 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, 29 Nov 2017 01:44:57 GMT
|
127
|
+
- request:
|
128
|
+
method: post
|
129
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products
|
130
|
+
body:
|
131
|
+
encoding: UTF-8
|
132
|
+
string: |
|
133
|
+
<?xml version="1.0"?>
|
134
|
+
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:data="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:metadata="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xml:base="http://services.odata.org/OData/OData.svc/"><category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><author><name/></author><content type="application/xml"><metadata:properties><data:Name metadata:type="Edm.String" metadata:null="true"/><data:Description metadata:type="Edm.String" metadata:null="true"/><data:ReleaseDate metadata:type="Edm.DateTimeOffset" metadata:null="true"/><data:DiscontinuedDate metadata:type="Edm.DateTimeOffset" metadata:null="true"/><data:Rating metadata:type="Edm.Int16" metadata:null="true"/><data:Price metadata:type="Edm.Double" metadata:null="true"/></metadata:properties></content>
|
135
|
+
</entry>
|
136
|
+
headers:
|
137
|
+
User-Agent:
|
138
|
+
- Typhoeus - https://github.com/typhoeus/typhoeus
|
139
|
+
Accept:
|
140
|
+
- application/atom+xml
|
141
|
+
Content-Type:
|
142
|
+
- application/atom+xml
|
143
|
+
response:
|
144
|
+
status:
|
145
|
+
code: 400
|
146
|
+
message: Bad Request
|
147
|
+
headers:
|
148
|
+
Cache-Control:
|
149
|
+
- private
|
150
|
+
Content-Length:
|
151
|
+
- '253'
|
152
|
+
Content-Type:
|
153
|
+
- application/xml;charset=utf-8
|
154
|
+
Server:
|
155
|
+
- Microsoft-IIS/8.0
|
156
|
+
X-Content-Type-Options:
|
157
|
+
- nosniff
|
158
|
+
OData-Version:
|
159
|
+
- '4.0'
|
160
|
+
X-AspNet-Version:
|
161
|
+
- 4.0.30319
|
162
|
+
X-Powered-By:
|
163
|
+
- ASP.NET
|
164
|
+
Access-Control-Allow-Origin:
|
165
|
+
- "*"
|
166
|
+
Access-Control-Allow-Methods:
|
167
|
+
- GET
|
168
|
+
Access-Control-Allow-Headers:
|
169
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
170
|
+
Access-Control-Expose-Headers:
|
171
|
+
- DataServiceVersion
|
172
|
+
Date:
|
173
|
+
- Wed, 29 Nov 2017 01:44:57 GMT
|
174
|
+
body:
|
175
|
+
encoding: UTF-8
|
176
|
+
string: <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://docs.oasis-open.org/odata/ns/metadata"><m:code
|
177
|
+
/><m:message>Error processing request stream. Type information must be specified
|
178
|
+
for types that take part in inheritance.</m:message></m:error>
|
179
|
+
http_version: '1.1'
|
180
|
+
adapter_metadata:
|
181
|
+
effective_url: http://services.odata.org/V4/OData/OData.svc/Products
|
182
|
+
recorded_at: Wed, 29 Nov 2017 01:44:57 GMT
|
183
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,256 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products?$top=1
|
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
|
+
Accept:
|
15
|
+
- application/atom+xml
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache
|
23
|
+
Content-Length:
|
24
|
+
- '2179'
|
25
|
+
Content-Type:
|
26
|
+
- application/atom+xml;type=feed;charset=utf-8
|
27
|
+
Server:
|
28
|
+
- Microsoft-IIS/8.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
|
+
- Wed, 29 Nov 2017 20:54:13 GMT
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://services.odata.org/V4/OData/OData.svc/"
|
50
|
+
xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data"
|
51
|
+
xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss"
|
52
|
+
xmlns:gml="http://www.opengis.net/gml" m:context="http://services.odata.org/V4/OData/OData.svc/$metadata#Products"><id>http://services.odata.org/V4/OData/OData.svc/Products</id><title
|
53
|
+
type="text">Products</title><updated>2017-11-29T20:54:14Z</updated><link rel="self"
|
54
|
+
title="Products" href="Products" /><entry><id>http://services.odata.org/V4/OData/OData.svc/Products(0)</id><category
|
55
|
+
term="#ODataDemo.Product" scheme="http://docs.oasis-open.org/odata/ns/scheme"
|
56
|
+
/><link rel="edit" title="Product" href="Products(0)" /><link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Categories"
|
57
|
+
type="application/xml" title="Categories" href="Products(0)/Categories/$ref"
|
58
|
+
/><link rel="http://docs.oasis-open.org/odata/ns/related/Categories" type="application/atom+xml;type=feed"
|
59
|
+
title="Categories" href="Products(0)/Categories" /><link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Supplier"
|
60
|
+
type="application/xml" title="Supplier" href="Products(0)/Supplier/$ref" /><link
|
61
|
+
rel="http://docs.oasis-open.org/odata/ns/related/Supplier" type="application/atom+xml;type=entry"
|
62
|
+
title="Supplier" href="Products(0)/Supplier" /><link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/ProductDetail"
|
63
|
+
type="application/xml" title="ProductDetail" href="Products(0)/ProductDetail/$ref"
|
64
|
+
/><link rel="http://docs.oasis-open.org/odata/ns/related/ProductDetail" type="application/atom+xml;type=entry"
|
65
|
+
title="ProductDetail" href="Products(0)/ProductDetail" /><title /><updated>2017-11-29T20:54:14Z</updated><author><name
|
66
|
+
/></author><content type="application/xml"><m:properties><d:ID m:type="Int32">0</d:ID><d:Name>Bread</d:Name><d:Description>Whole
|
67
|
+
grain bread</d:Description><d:ReleaseDate m:type="DateTimeOffset">1992-01-01T00:00:00Z</d:ReleaseDate><d:DiscontinuedDate
|
68
|
+
m:null="true" /><d:Rating m:type="Int16">4</d:Rating><d:Price m:type="Double">2.5</d:Price></m:properties></content></entry></feed>
|
69
|
+
http_version: '1.1'
|
70
|
+
adapter_metadata:
|
71
|
+
effective_url: http://services.odata.org/V4/OData/OData.svc/Products?$top=1
|
72
|
+
recorded_at: Wed, 29 Nov 2017 20:54:14 GMT
|
73
|
+
- request:
|
74
|
+
method: get
|
75
|
+
uri: http://services.odata.org/V4/OData/OData.svc/$metadata
|
76
|
+
body:
|
77
|
+
encoding: US-ASCII
|
78
|
+
string: ''
|
79
|
+
headers:
|
80
|
+
User-Agent:
|
81
|
+
- Typhoeus - https://github.com/typhoeus/typhoeus
|
82
|
+
OData-Version:
|
83
|
+
- '4.0'
|
84
|
+
response:
|
85
|
+
status:
|
86
|
+
code: 200
|
87
|
+
message: OK
|
88
|
+
headers:
|
89
|
+
Cache-Control:
|
90
|
+
- no-cache
|
91
|
+
Content-Length:
|
92
|
+
- '6742'
|
93
|
+
Content-Type:
|
94
|
+
- application/xml;charset=utf-8
|
95
|
+
Server:
|
96
|
+
- Microsoft-IIS/8.0
|
97
|
+
X-Content-Type-Options:
|
98
|
+
- nosniff
|
99
|
+
OData-Version:
|
100
|
+
- 4.0;
|
101
|
+
X-AspNet-Version:
|
102
|
+
- 4.0.30319
|
103
|
+
X-Powered-By:
|
104
|
+
- ASP.NET
|
105
|
+
Access-Control-Allow-Origin:
|
106
|
+
- "*"
|
107
|
+
Access-Control-Allow-Methods:
|
108
|
+
- GET
|
109
|
+
Access-Control-Allow-Headers:
|
110
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
111
|
+
Access-Control-Expose-Headers:
|
112
|
+
- DataServiceVersion
|
113
|
+
Date:
|
114
|
+
- Wed, 29 Nov 2017 20:54:13 GMT
|
115
|
+
body:
|
116
|
+
encoding: UTF-8
|
117
|
+
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
|
118
|
+
Namespace="ODataDemo" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType
|
119
|
+
Name="Product"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int32"
|
120
|
+
Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description"
|
121
|
+
Type="Edm.String" /><Property Name="ReleaseDate" Type="Edm.DateTimeOffset"
|
122
|
+
Nullable="false" /><Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset"
|
123
|
+
/><Property Name="Rating" Type="Edm.Int16" Nullable="false" /><Property Name="Price"
|
124
|
+
Type="Edm.Double" Nullable="false" /><NavigationProperty Name="Categories"
|
125
|
+
Type="Collection(ODataDemo.Category)" Partner="Products" /><NavigationProperty
|
126
|
+
Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" /><NavigationProperty
|
127
|
+
Name="ProductDetail" Type="ODataDemo.ProductDetail" Partner="Product" /></EntityType><EntityType
|
128
|
+
Name="FeaturedProduct" BaseType="ODataDemo.Product"><NavigationProperty Name="Advertisement"
|
129
|
+
Type="ODataDemo.Advertisement" Partner="FeaturedProduct" /></EntityType><EntityType
|
130
|
+
Name="ProductDetail"><Key><PropertyRef Name="ProductID" /></Key><Property
|
131
|
+
Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="Details"
|
132
|
+
Type="Edm.String" /><NavigationProperty Name="Product" Type="ODataDemo.Product"
|
133
|
+
Partner="ProductDetail" /></EntityType><EntityType Name="Category" OpenType="true"><Key><PropertyRef
|
134
|
+
Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
|
135
|
+
Name="Name" Type="Edm.String" /><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
|
136
|
+
Partner="Categories" /></EntityType><EntityType Name="Supplier"><Key><PropertyRef
|
137
|
+
Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
|
138
|
+
Name="Name" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
|
139
|
+
/><Property Name="Location" Type="Edm.GeographyPoint" SRID="Variable" /><Property
|
140
|
+
Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed" Nullable="false"
|
141
|
+
/><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
|
142
|
+
Partner="Supplier" /></EntityType><ComplexType Name="Address"><Property Name="Street"
|
143
|
+
Type="Edm.String" /><Property Name="City" Type="Edm.String" /><Property Name="State"
|
144
|
+
Type="Edm.String" /><Property Name="ZipCode" Type="Edm.String" /><Property
|
145
|
+
Name="Country" Type="Edm.String" /></ComplexType><EntityType Name="Person"><Key><PropertyRef
|
146
|
+
Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
|
147
|
+
Name="Name" Type="Edm.String" /><NavigationProperty Name="PersonDetail" Type="ODataDemo.PersonDetail"
|
148
|
+
Partner="Person" /></EntityType><EntityType Name="Customer" BaseType="ODataDemo.Person"><Property
|
149
|
+
Name="TotalExpense" Type="Edm.Decimal" Nullable="false" /></EntityType><EntityType
|
150
|
+
Name="Employee" BaseType="ODataDemo.Person"><Property Name="EmployeeID" Type="Edm.Int64"
|
151
|
+
Nullable="false" /><Property Name="HireDate" Type="Edm.DateTimeOffset" Nullable="false"
|
152
|
+
/><Property Name="Salary" Type="Edm.Single" Nullable="false" /></EntityType><EntityType
|
153
|
+
Name="PersonDetail"><Key><PropertyRef Name="PersonID" /></Key><Property Name="PersonID"
|
154
|
+
Type="Edm.Int32" Nullable="false" /><Property Name="Age" Type="Edm.Byte" Nullable="false"
|
155
|
+
/><Property Name="Gender" Type="Edm.Boolean" Nullable="false" /><Property
|
156
|
+
Name="Phone" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
|
157
|
+
/><Property Name="Photo" Type="Edm.Stream" Nullable="false" /><NavigationProperty
|
158
|
+
Name="Person" Type="ODataDemo.Person" Partner="PersonDetail" /></EntityType><EntityType
|
159
|
+
Name="Advertisement" HasStream="true"><Key><PropertyRef Name="ID" /></Key><Property
|
160
|
+
Name="ID" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String"
|
161
|
+
/><Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" /><NavigationProperty
|
162
|
+
Name="FeaturedProduct" Type="ODataDemo.FeaturedProduct" Partner="Advertisement"
|
163
|
+
/></EntityType><EntityContainer Name="DemoService"><EntitySet Name="Products"
|
164
|
+
EntityType="ODataDemo.Product"><NavigationPropertyBinding Path="ODataDemo.FeaturedProduct/Advertisement"
|
165
|
+
Target="Advertisements" /><NavigationPropertyBinding Path="Categories" Target="Categories"
|
166
|
+
/><NavigationPropertyBinding Path="Supplier" Target="Suppliers" /><NavigationPropertyBinding
|
167
|
+
Path="ProductDetail" Target="ProductDetails" /></EntitySet><EntitySet Name="ProductDetails"
|
168
|
+
EntityType="ODataDemo.ProductDetail"><NavigationPropertyBinding Path="Product"
|
169
|
+
Target="Products" /></EntitySet><EntitySet Name="Categories" EntityType="ODataDemo.Category"><NavigationPropertyBinding
|
170
|
+
Path="Products" Target="Products" /></EntitySet><EntitySet Name="Suppliers"
|
171
|
+
EntityType="ODataDemo.Supplier"><NavigationPropertyBinding Path="Products"
|
172
|
+
Target="Products" /></EntitySet><EntitySet Name="Persons" EntityType="ODataDemo.Person"><NavigationPropertyBinding
|
173
|
+
Path="PersonDetail" Target="PersonDetails" /></EntitySet><EntitySet Name="PersonDetails"
|
174
|
+
EntityType="ODataDemo.PersonDetail"><NavigationPropertyBinding Path="Person"
|
175
|
+
Target="Persons" /></EntitySet><EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement"><NavigationPropertyBinding
|
176
|
+
Path="FeaturedProduct" Target="Products" /></EntitySet></EntityContainer><Annotations
|
177
|
+
Target="ODataDemo.DemoService"><Annotation Term="Org.OData.Display.V1.Description"
|
178
|
+
String="This is a sample OData service with vocabularies" /></Annotations><Annotations
|
179
|
+
Target="ODataDemo.Product"><Annotation Term="Org.OData.Display.V1.Description"
|
180
|
+
String="All Products available in the online store" /></Annotations><Annotations
|
181
|
+
Target="ODataDemo.Product/Name"><Annotation Term="Org.OData.Display.V1.DisplayName"
|
182
|
+
String="Product Name" /></Annotations><Annotations Target="ODataDemo.DemoService/Suppliers"><Annotation
|
183
|
+
Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." /><Annotation
|
184
|
+
Term="Org.OData.Publication.V1.PublisherId" String="MSFT" /><Annotation Term="Org.OData.Publication.V1.Keywords"
|
185
|
+
String="Inventory, Supplier, Advertisers, Sales, Finance" /><Annotation Term="Org.OData.Publication.V1.AttributionUrl"
|
186
|
+
String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.AttributionDescription"
|
187
|
+
String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.DocumentationUrl
|
188
|
+
" String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.TermsOfUseUrl"
|
189
|
+
String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl"
|
190
|
+
String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.LastModified"
|
191
|
+
String="4/2/2013" /><Annotation Term="Org.OData.Publication.V1.ImageUrl "
|
192
|
+
String="http://www.odata.org/" /></Annotations></Schema></edmx:DataServices></edmx:Edmx>
|
193
|
+
http_version: '1.1'
|
194
|
+
adapter_metadata:
|
195
|
+
effective_url: http://services.odata.org/V4/OData/OData.svc/$metadata
|
196
|
+
recorded_at: Wed, 29 Nov 2017 20:54:14 GMT
|
197
|
+
- request:
|
198
|
+
method: post
|
199
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products(0)
|
200
|
+
body:
|
201
|
+
encoding: UTF-8
|
202
|
+
string: |
|
203
|
+
<?xml version="1.0"?>
|
204
|
+
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:data="http://docs.oasis-open.org/odata/ns/data" xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xml:base="http://services.odata.org/V4/OData/OData.svc"><category term="ODataDemo.Product" scheme="http://docs.oasis-open.org/odata/ns/scheme"/><author><name/></author><content type="application/xml"><metadata:properties/></content>
|
205
|
+
</entry>
|
206
|
+
headers:
|
207
|
+
User-Agent:
|
208
|
+
- Typhoeus - https://github.com/typhoeus/typhoeus
|
209
|
+
Accept:
|
210
|
+
- application/atom+xml
|
211
|
+
Content-Type:
|
212
|
+
- application/atom+xml
|
213
|
+
response:
|
214
|
+
status:
|
215
|
+
code: 405
|
216
|
+
message: Method Not Allowed
|
217
|
+
headers:
|
218
|
+
Cache-Control:
|
219
|
+
- private
|
220
|
+
Allow:
|
221
|
+
- GET, PUT, PATCH, DELETE
|
222
|
+
Content-Length:
|
223
|
+
- '325'
|
224
|
+
Content-Type:
|
225
|
+
- application/xml;charset=utf-8
|
226
|
+
Server:
|
227
|
+
- Microsoft-IIS/8.0
|
228
|
+
X-Content-Type-Options:
|
229
|
+
- nosniff
|
230
|
+
OData-Version:
|
231
|
+
- '4.0'
|
232
|
+
X-AspNet-Version:
|
233
|
+
- 4.0.30319
|
234
|
+
X-Powered-By:
|
235
|
+
- ASP.NET
|
236
|
+
Access-Control-Allow-Origin:
|
237
|
+
- "*"
|
238
|
+
Access-Control-Allow-Methods:
|
239
|
+
- GET
|
240
|
+
Access-Control-Allow-Headers:
|
241
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
242
|
+
Access-Control-Expose-Headers:
|
243
|
+
- DataServiceVersion
|
244
|
+
Date:
|
245
|
+
- Wed, 29 Nov 2017 20:54:13 GMT
|
246
|
+
body:
|
247
|
+
encoding: UTF-8
|
248
|
+
string: <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://docs.oasis-open.org/odata/ns/metadata"><m:code
|
249
|
+
/><m:message>The URI 'http://services.odata.org/V4/OData/OData.svc/Products(0)'
|
250
|
+
is not valid for POST operation. For POST operations, the URI must refer to
|
251
|
+
a service operation or an entity set.</m:message></m:error>
|
252
|
+
http_version: '1.1'
|
253
|
+
adapter_metadata:
|
254
|
+
effective_url: http://services.odata.org/V4/OData/OData.svc/Products(0)
|
255
|
+
recorded_at: Wed, 29 Nov 2017 20:54:14 GMT
|
256
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,185 @@
|
|
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
|
+
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, 29 Nov 2017 20:59:10 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, 29 Nov 2017 20:59:11 GMT
|
127
|
+
- request:
|
128
|
+
method: post
|
129
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products
|
130
|
+
body:
|
131
|
+
encoding: UTF-8
|
132
|
+
string: |
|
133
|
+
<?xml version="1.0"?>
|
134
|
+
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:data="http://docs.oasis-open.org/odata/ns/data" xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xml:base="http://services.odata.org/V4/OData/OData.svc"><category term="ODataDemo.Product" scheme="http://docs.oasis-open.org/odata/ns/scheme"/><author><name/></author><content type="application/xml"><metadata:properties><data:Name metadata:type="Edm.String">Widget</data:Name><data:Description metadata:type="Edm.String">Just a simple widget</data:Description><data:ReleaseDate metadata:type="Edm.DateTimeOffset">2017-11-29T20:59:09+00:00</data:ReleaseDate><data:DiscontinuedDate metadata:type="Edm.DateTimeOffset" metadata:null="true"/><data:Rating metadata:type="Edm.Int16">4</data:Rating><data:Price metadata:type="Edm.Double">3.5</data:Price></metadata:properties></content>
|
135
|
+
</entry>
|
136
|
+
headers:
|
137
|
+
User-Agent:
|
138
|
+
- Typhoeus - https://github.com/typhoeus/typhoeus
|
139
|
+
Accept:
|
140
|
+
- application/atom+xml
|
141
|
+
Content-Type:
|
142
|
+
- application/atom+xml
|
143
|
+
response:
|
144
|
+
status:
|
145
|
+
code: 403
|
146
|
+
message: Forbidden
|
147
|
+
headers:
|
148
|
+
Cache-Control:
|
149
|
+
- private
|
150
|
+
Content-Length:
|
151
|
+
- '1254'
|
152
|
+
Content-Type:
|
153
|
+
- application/xml;charset=utf-8
|
154
|
+
Server:
|
155
|
+
- Microsoft-IIS/8.0
|
156
|
+
X-Content-Type-Options:
|
157
|
+
- nosniff
|
158
|
+
OData-Version:
|
159
|
+
- '4.0'
|
160
|
+
X-AspNet-Version:
|
161
|
+
- 4.0.30319
|
162
|
+
X-Powered-By:
|
163
|
+
- ASP.NET
|
164
|
+
Access-Control-Allow-Origin:
|
165
|
+
- "*"
|
166
|
+
Access-Control-Allow-Methods:
|
167
|
+
- GET
|
168
|
+
Access-Control-Allow-Headers:
|
169
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
170
|
+
Access-Control-Expose-Headers:
|
171
|
+
- DataServiceVersion
|
172
|
+
Date:
|
173
|
+
- Wed, 29 Nov 2017 20:59:10 GMT
|
174
|
+
body:
|
175
|
+
encoding: UTF-8
|
176
|
+
string: |-
|
177
|
+
<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://docs.oasis-open.org/odata/ns/metadata"><m:code /><m:message>You are connected to a read-only data session. Update operations are not permitted for your session</m:message><m:innererror><m:message>Exception has been thrown by the target of an invocation.</m:message><m:type>System.Reflection.TargetInvocationException</m:type><m:stacktrace> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
|
178
|
+
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
|
179
|
+
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
|
180
|
+
at Microsoft.OData.Service.UpdateTracker.FireNotifications()</m:stacktrace><m:internalexception><m:message>You are connected to a read-only data session. Update operations are not permitted for your session</m:message><m:type>Microsoft.OData.Service.DataServiceException</m:type><m:stacktrace> at ODataWebExperimental.OData.ODataService.OnUpdateOperation(Object source, UpdateOperations action)</m:stacktrace></m:internalexception></m:innererror></m:error>
|
181
|
+
http_version: '1.1'
|
182
|
+
adapter_metadata:
|
183
|
+
effective_url: http://services.odata.org/V4/OData/OData.svc/Products
|
184
|
+
recorded_at: Wed, 29 Nov 2017 20:59:11 GMT
|
185
|
+
recorded_with: VCR 2.9.3
|