frodata 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
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,127 @@
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
+ - Fri, 01 Dec 2017 18:18:14 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: Fri, 01 Dec 2017 18:18:15 GMT
127
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,193 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://services.odata.org/V4/OData/OData.svc/Products
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,application/json,application/xml,text/plain
16
+ Expect:
17
+ - ''
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - no-cache
25
+ Content-Length:
26
+ - '1981'
27
+ Content-Type:
28
+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
29
+ Server:
30
+ - Microsoft-IIS/10.0
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ OData-Version:
34
+ - 4.0;
35
+ X-AspNet-Version:
36
+ - 4.0.30319
37
+ X-Powered-By:
38
+ - ASP.NET
39
+ Access-Control-Allow-Origin:
40
+ - "*"
41
+ Access-Control-Allow-Methods:
42
+ - GET
43
+ Access-Control-Allow-Headers:
44
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
45
+ Access-Control-Expose-Headers:
46
+ - DataServiceVersion
47
+ Date:
48
+ - Thu, 15 Feb 2018 19:55:09 GMT
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products","value":[{"ID":0,"Name":"Bread","Description":"Whole
52
+ grain bread","ReleaseDate":"1992-01-01T00:00:00Z","DiscontinuedDate":null,"Rating":4,"Price":2.5},{"ID":1,"Name":"Milk","Description":"Low
53
+ fat milk","ReleaseDate":"1995-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":3.5},{"ID":2,"Name":"Vint
54
+ soda","Description":"Americana Variety - Mix of 6 flavors","ReleaseDate":"2000-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":20.9},{"ID":3,"Name":"Havina
55
+ Cola","Description":"The Original Key Lime Cola","ReleaseDate":"2005-10-01T00:00:00Z","DiscontinuedDate":"2006-10-01T00:00:00Z","Rating":3,"Price":19.9},{"ID":4,"Name":"Fruit
56
+ Punch","Description":"Mango flavor, 8.3 Ounce Cans (Pack of 24)","ReleaseDate":"2003-01-05T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":22.99},{"ID":5,"Name":"Cranberry
57
+ Juice","Description":"16-Ounce Plastic Bottles (Pack of 12)","ReleaseDate":"2006-08-04T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":22.8},{"ID":6,"Name":"Pink
58
+ Lemonade","Description":"36 Ounce Cans (Pack of 3)","ReleaseDate":"2006-11-05T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":18.8},{"ID":7,"Name":"DVD
59
+ Player","Description":"1080P Upconversion DVD Player","ReleaseDate":"2006-11-15T00:00:00Z","DiscontinuedDate":null,"Rating":5,"Price":35.88},{"ID":8,"Name":"LCD
60
+ HDTV","Description":"42 inch 1080p LCD with Built-in Blu-ray Disc Player","ReleaseDate":"2008-05-08T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":1088.8},{"@odata.type":"#ODataDemo.FeaturedProduct","ID":9,"Name":"Lemonade","Description":"Classic,
61
+ refreshing lemonade (Single bottle)","ReleaseDate":"1970-01-01T00:00:00Z","DiscontinuedDate":null,"Rating":7,"Price":1.01},{"@odata.type":"#ODataDemo.FeaturedProduct","ID":10,"Name":"Coffee","Description":"Bulk
62
+ size can of instant coffee","ReleaseDate":"1982-12-31T00:00:00Z","DiscontinuedDate":null,"Rating":1,"Price":6.99}]}'
63
+ http_version: '1.1'
64
+ adapter_metadata:
65
+ effective_url: http://services.odata.org/V4/OData/OData.svc/Products
66
+ recorded_at: Thu, 15 Feb 2018 19:55:10 GMT
67
+ - request:
68
+ method: get
69
+ uri: http://services.odata.org/V4/OData/OData.svc/$metadata
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ''
73
+ headers:
74
+ User-Agent:
75
+ - Typhoeus - https://github.com/typhoeus/typhoeus
76
+ OData-Version:
77
+ - '4.0'
78
+ Expect:
79
+ - ''
80
+ response:
81
+ status:
82
+ code: 200
83
+ message: OK
84
+ headers:
85
+ Cache-Control:
86
+ - no-cache
87
+ Content-Length:
88
+ - '6742'
89
+ Content-Type:
90
+ - application/xml;charset=utf-8
91
+ Server:
92
+ - Microsoft-IIS/10.0
93
+ X-Content-Type-Options:
94
+ - nosniff
95
+ OData-Version:
96
+ - 4.0;
97
+ X-AspNet-Version:
98
+ - 4.0.30319
99
+ X-Powered-By:
100
+ - ASP.NET
101
+ Access-Control-Allow-Origin:
102
+ - "*"
103
+ Access-Control-Allow-Methods:
104
+ - GET
105
+ Access-Control-Allow-Headers:
106
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
107
+ Access-Control-Expose-Headers:
108
+ - DataServiceVersion
109
+ Date:
110
+ - Thu, 15 Feb 2018 20:48:14 GMT
111
+ body:
112
+ encoding: UTF-8
113
+ 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
114
+ Namespace="ODataDemo" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType
115
+ Name="Product"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int32"
116
+ Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description"
117
+ Type="Edm.String" /><Property Name="ReleaseDate" Type="Edm.DateTimeOffset"
118
+ Nullable="false" /><Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset"
119
+ /><Property Name="Rating" Type="Edm.Int16" Nullable="false" /><Property Name="Price"
120
+ Type="Edm.Double" Nullable="false" /><NavigationProperty Name="Categories"
121
+ Type="Collection(ODataDemo.Category)" Partner="Products" /><NavigationProperty
122
+ Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" /><NavigationProperty
123
+ Name="ProductDetail" Type="ODataDemo.ProductDetail" Partner="Product" /></EntityType><EntityType
124
+ Name="FeaturedProduct" BaseType="ODataDemo.Product"><NavigationProperty Name="Advertisement"
125
+ Type="ODataDemo.Advertisement" Partner="FeaturedProduct" /></EntityType><EntityType
126
+ Name="ProductDetail"><Key><PropertyRef Name="ProductID" /></Key><Property
127
+ Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="Details"
128
+ Type="Edm.String" /><NavigationProperty Name="Product" Type="ODataDemo.Product"
129
+ Partner="ProductDetail" /></EntityType><EntityType Name="Category" OpenType="true"><Key><PropertyRef
130
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
131
+ Name="Name" Type="Edm.String" /><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
132
+ Partner="Categories" /></EntityType><EntityType Name="Supplier"><Key><PropertyRef
133
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
134
+ Name="Name" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
135
+ /><Property Name="Location" Type="Edm.GeographyPoint" SRID="Variable" /><Property
136
+ Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed" Nullable="false"
137
+ /><NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)"
138
+ Partner="Supplier" /></EntityType><ComplexType Name="Address"><Property Name="Street"
139
+ Type="Edm.String" /><Property Name="City" Type="Edm.String" /><Property Name="State"
140
+ Type="Edm.String" /><Property Name="ZipCode" Type="Edm.String" /><Property
141
+ Name="Country" Type="Edm.String" /></ComplexType><EntityType Name="Person"><Key><PropertyRef
142
+ Name="ID" /></Key><Property Name="ID" Type="Edm.Int32" Nullable="false" /><Property
143
+ Name="Name" Type="Edm.String" /><NavigationProperty Name="PersonDetail" Type="ODataDemo.PersonDetail"
144
+ Partner="Person" /></EntityType><EntityType Name="Customer" BaseType="ODataDemo.Person"><Property
145
+ Name="TotalExpense" Type="Edm.Decimal" Nullable="false" /></EntityType><EntityType
146
+ Name="Employee" BaseType="ODataDemo.Person"><Property Name="EmployeeID" Type="Edm.Int64"
147
+ Nullable="false" /><Property Name="HireDate" Type="Edm.DateTimeOffset" Nullable="false"
148
+ /><Property Name="Salary" Type="Edm.Single" Nullable="false" /></EntityType><EntityType
149
+ Name="PersonDetail"><Key><PropertyRef Name="PersonID" /></Key><Property Name="PersonID"
150
+ Type="Edm.Int32" Nullable="false" /><Property Name="Age" Type="Edm.Byte" Nullable="false"
151
+ /><Property Name="Gender" Type="Edm.Boolean" Nullable="false" /><Property
152
+ Name="Phone" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
153
+ /><Property Name="Photo" Type="Edm.Stream" Nullable="false" /><NavigationProperty
154
+ Name="Person" Type="ODataDemo.Person" Partner="PersonDetail" /></EntityType><EntityType
155
+ Name="Advertisement" HasStream="true"><Key><PropertyRef Name="ID" /></Key><Property
156
+ Name="ID" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String"
157
+ /><Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" /><NavigationProperty
158
+ Name="FeaturedProduct" Type="ODataDemo.FeaturedProduct" Partner="Advertisement"
159
+ /></EntityType><EntityContainer Name="DemoService"><EntitySet Name="Products"
160
+ EntityType="ODataDemo.Product"><NavigationPropertyBinding Path="ODataDemo.FeaturedProduct/Advertisement"
161
+ Target="Advertisements" /><NavigationPropertyBinding Path="Categories" Target="Categories"
162
+ /><NavigationPropertyBinding Path="Supplier" Target="Suppliers" /><NavigationPropertyBinding
163
+ Path="ProductDetail" Target="ProductDetails" /></EntitySet><EntitySet Name="ProductDetails"
164
+ EntityType="ODataDemo.ProductDetail"><NavigationPropertyBinding Path="Product"
165
+ Target="Products" /></EntitySet><EntitySet Name="Categories" EntityType="ODataDemo.Category"><NavigationPropertyBinding
166
+ Path="Products" Target="Products" /></EntitySet><EntitySet Name="Suppliers"
167
+ EntityType="ODataDemo.Supplier"><NavigationPropertyBinding Path="Products"
168
+ Target="Products" /></EntitySet><EntitySet Name="Persons" EntityType="ODataDemo.Person"><NavigationPropertyBinding
169
+ Path="PersonDetail" Target="PersonDetails" /></EntitySet><EntitySet Name="PersonDetails"
170
+ EntityType="ODataDemo.PersonDetail"><NavigationPropertyBinding Path="Person"
171
+ Target="Persons" /></EntitySet><EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement"><NavigationPropertyBinding
172
+ Path="FeaturedProduct" Target="Products" /></EntitySet></EntityContainer><Annotations
173
+ Target="ODataDemo.DemoService"><Annotation Term="Org.OData.Display.V1.Description"
174
+ String="This is a sample OData service with vocabularies" /></Annotations><Annotations
175
+ Target="ODataDemo.Product"><Annotation Term="Org.OData.Display.V1.Description"
176
+ String="All Products available in the online store" /></Annotations><Annotations
177
+ Target="ODataDemo.Product/Name"><Annotation Term="Org.OData.Display.V1.DisplayName"
178
+ String="Product Name" /></Annotations><Annotations Target="ODataDemo.DemoService/Suppliers"><Annotation
179
+ Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." /><Annotation
180
+ Term="Org.OData.Publication.V1.PublisherId" String="MSFT" /><Annotation Term="Org.OData.Publication.V1.Keywords"
181
+ String="Inventory, Supplier, Advertisers, Sales, Finance" /><Annotation Term="Org.OData.Publication.V1.AttributionUrl"
182
+ String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.AttributionDescription"
183
+ String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.DocumentationUrl
184
+ " String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.TermsOfUseUrl"
185
+ String="All rights reserved" /><Annotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl"
186
+ String="http://www.odata.org/" /><Annotation Term="Org.OData.Publication.V1.LastModified"
187
+ String="4/2/2013" /><Annotation Term="Org.OData.Publication.V1.ImageUrl "
188
+ String="http://www.odata.org/" /></Annotations></Schema></edmx:DataServices></edmx:Edmx>
189
+ http_version: '1.1'
190
+ adapter_metadata:
191
+ effective_url: http://services.odata.org/V4/OData/OData.svc/$metadata
192
+ recorded_at: Thu, 15 Feb 2018 20:48:14 GMT
193
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,129 @@
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:30:37 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:30:39 GMT
129
+ recorded_with: VCR 2.9.3