spree_api 4.2.3 → 4.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +14 -1
- data/app/controllers/concerns/spree/api/v2/product_list_includes.rb +23 -0
- data/app/controllers/spree/api/v1/classifications_controller.rb +4 -3
- data/app/controllers/spree/api/v1/orders_controller.rb +5 -1
- data/app/controllers/spree/api/v1/products_controller.rb +2 -2
- data/app/controllers/spree/api/v1/taxonomies_controller.rb +1 -1
- data/app/controllers/spree/api/v2/base_controller.rb +29 -6
- data/app/controllers/spree/api/v2/platform/addresses_controller.rb +19 -0
- data/app/controllers/spree/api/v2/platform/classifications_controller.rb +43 -0
- data/app/controllers/spree/api/v2/platform/cms_pages_controller.rb +15 -0
- data/app/controllers/spree/api/v2/platform/cms_sections_controller.rb +34 -0
- data/app/controllers/spree/api/v2/platform/countries_controller.rb +19 -0
- data/app/controllers/spree/api/v2/platform/menu_items_controller.rb +35 -0
- data/app/controllers/spree/api/v2/platform/menus_controller.rb +19 -0
- data/app/controllers/spree/api/v2/platform/option_types_controller.rb +15 -0
- data/app/controllers/spree/api/v2/platform/option_values_controller.rb +19 -0
- data/app/controllers/spree/api/v2/platform/products_controller.rb +21 -0
- data/app/controllers/spree/api/v2/platform/resource_controller.rb +112 -0
- data/app/controllers/spree/api/v2/platform/taxons_controller.rb +30 -0
- data/app/controllers/spree/api/v2/platform/users_controller.rb +28 -0
- data/app/controllers/spree/api/v2/resource_controller.rb +18 -6
- data/app/controllers/spree/api/v2/storefront/account/addresses_controller.rb +2 -14
- data/app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb +13 -11
- data/app/controllers/spree/api/v2/storefront/account/orders_controller.rb +2 -2
- data/app/controllers/spree/api/v2/storefront/account_controller.rb +32 -1
- data/app/controllers/spree/api/v2/storefront/cart_controller.rb +28 -6
- data/app/controllers/spree/api/v2/storefront/checkout_controller.rb +2 -1
- data/app/controllers/spree/api/v2/storefront/cms_pages_controller.rb +41 -0
- data/app/controllers/spree/api/v2/storefront/countries_controller.rb +9 -14
- data/app/controllers/spree/api/v2/storefront/menus_controller.rb +35 -0
- data/app/controllers/spree/api/v2/storefront/order_status_controller.rb +1 -1
- data/app/controllers/spree/api/v2/storefront/products_controller.rb +6 -12
- data/app/controllers/spree/api/v2/storefront/stores_controller.rb +1 -1
- data/app/controllers/spree/api/v2/storefront/taxons_controller.rb +7 -8
- data/app/helpers/spree/api/v2/display_money_helper.rb +2 -2
- data/app/models/spree/api_configuration.rb +1 -0
- data/app/models/spree/api_dependencies.rb +19 -5
- data/app/serializers/concerns/spree/api/v2/resource_serializer_concern.rb +16 -0
- data/app/serializers/spree/api/v2/base_serializer.rb +32 -0
- data/app/serializers/spree/api/v2/platform/address_serializer.rb +15 -0
- data/app/serializers/spree/api/v2/platform/base_serializer.rb +10 -0
- data/app/serializers/spree/api/v2/platform/classification_serializer.rb +14 -0
- data/app/serializers/spree/api/v2/platform/cms_page_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/cms_section_serializer.rb +11 -0
- data/app/serializers/spree/api/v2/platform/country_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/image_serializer.rb +15 -0
- data/app/serializers/spree/api/v2/platform/menu_item_serializer.rb +22 -0
- data/app/serializers/spree/api/v2/platform/menu_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/option_type_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/option_value_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/product_property_serializer.rb +11 -0
- data/app/serializers/spree/api/v2/platform/product_serializer.rb +78 -0
- data/app/serializers/spree/api/v2/platform/state_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/stock_item_serializer.rb +20 -0
- data/app/serializers/spree/api/v2/platform/stock_location_serializer.rb +16 -0
- data/app/serializers/spree/api/v2/platform/store_serializer.rb +14 -0
- data/app/serializers/spree/api/v2/platform/tax_category_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/taxon_image_serializer.rb +13 -0
- data/app/serializers/spree/api/v2/platform/taxon_serializer.rb +38 -0
- data/app/serializers/spree/api/v2/platform/taxonomy_serializer.rb +14 -0
- data/app/serializers/spree/api/v2/platform/user_serializer.rb +21 -0
- data/app/serializers/spree/api/v2/platform/variant_serializer.rb +57 -0
- data/app/serializers/spree/v2/storefront/base_serializer.rb +3 -2
- data/app/serializers/spree/v2/storefront/cms_page_serializer.rb +14 -0
- data/app/serializers/spree/v2/storefront/cms_section_serializer.rb +28 -0
- data/app/serializers/spree/v2/storefront/country_serializer.rb +4 -4
- data/app/serializers/spree/v2/storefront/estimated_shipping_rate_serializer.rb +2 -0
- data/app/serializers/spree/v2/storefront/menu_item_serializer.rb +37 -0
- data/app/serializers/spree/v2/storefront/menu_serializer.rb +13 -0
- data/app/serializers/spree/v2/storefront/product_property_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/product_serializer.rb +4 -1
- data/app/serializers/spree/v2/storefront/store_serializer.rb +10 -0
- data/app/serializers/spree/v2/storefront/taxon_serializer.rb +6 -5
- data/config/initializers/doorkeeper.rb +8 -1
- data/config/initializers/rabl.rb +9 -0
- data/config/routes.rb +115 -3
- data/db/migrate/20210727102516_change_integer_id_columns_type.rb +9 -0
- data/docs/oauth/index.yml +2 -2
- data/docs/v2/platform/index.yaml +1501 -0
- data/docs/v2/storefront/index.yaml +613 -433
- data/lib/spree/api.rb +1 -0
- data/lib/spree/api/engine.rb +6 -17
- data/lib/spree/api/testing_support/v2/base.rb +1 -1
- data/lib/spree/api/testing_support/v2/platform_contexts.rb +214 -0
- data/lib/spree/api/testing_support/v2/serializers_params.rb +14 -0
- data/spree_api.gemspec +5 -2
- metadata +107 -11
- data/app/assets/javascripts/spree/api/main.js +0 -36
- data/app/assets/javascripts/spree/api/storefront/cart.js +0 -49
data/lib/spree/api.rb
CHANGED
data/lib/spree/api/engine.rb
CHANGED
@@ -6,23 +6,6 @@ module Spree
|
|
6
6
|
isolate_namespace Spree
|
7
7
|
engine_name 'spree_api'
|
8
8
|
|
9
|
-
Rabl.configure do |config|
|
10
|
-
config.include_json_root = false
|
11
|
-
config.include_child_root = false
|
12
|
-
|
13
|
-
# Motivation here it make it call as_json when rendering timestamps
|
14
|
-
# and therefore display miliseconds. Otherwise it would fall to
|
15
|
-
# JSON.dump which doesn't display the miliseconds
|
16
|
-
config.json_engine = ActiveSupport::JSON
|
17
|
-
end
|
18
|
-
|
19
|
-
# sets the manifests / assets to be precompiled, even when initialize_on_precompile is false
|
20
|
-
initializer 'spree.assets.precompile', group: :all do |app|
|
21
|
-
app.config.assets.precompile += %w[
|
22
|
-
spree/api/all*
|
23
|
-
]
|
24
|
-
end
|
25
|
-
|
26
9
|
initializer 'spree.api.environment', before: :load_config_initializers do |_app|
|
27
10
|
Spree::Api::Config = Spree::ApiConfiguration.new
|
28
11
|
Spree::Api::Dependencies = Spree::ApiDependencies.new
|
@@ -32,6 +15,12 @@ module Spree
|
|
32
15
|
Migrations.new(config, engine_name).check
|
33
16
|
end
|
34
17
|
|
18
|
+
initializer 'spree.api.checking_deprecated_preferences' do
|
19
|
+
Spree::Api::Config.deprecated_preferences.each do |pref|
|
20
|
+
warn "[DEPRECATION] Spree::Api::Config[:#{pref[:name]}] is deprecated. #{pref[:message]}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
35
24
|
def self.root
|
36
25
|
@root ||= Pathname.new(File.expand_path('../../..', __dir__))
|
37
26
|
end
|
@@ -4,7 +4,7 @@ shared_context 'API v2 tokens' do
|
|
4
4
|
let(:headers_order_token) { { 'X-Spree-Order-Token' => order.token } }
|
5
5
|
end
|
6
6
|
|
7
|
-
[200, 201, 400, 401, 404, 403, 422].each do |status_code|
|
7
|
+
[200, 201, 204, 400, 401, 404, 403, 422].each do |status_code|
|
8
8
|
shared_examples "returns #{status_code} HTTP status" do
|
9
9
|
it "returns #{status_code}" do
|
10
10
|
expect(response.status).to eq(status_code)
|
@@ -0,0 +1,214 @@
|
|
1
|
+
class String
|
2
|
+
def articleize
|
3
|
+
%w(a e i o u).include?(self[0].downcase) ? "an #{self}" : "a #{self}"
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
shared_context 'Platform API v2' do
|
8
|
+
let(:store) { Spree::Store.default }
|
9
|
+
let(:admin_app) { Doorkeeper::Application.find_or_create_by!(name: 'Admin Panel', scopes: 'admin', redirect_uri: '') }
|
10
|
+
let(:read_app) { Doorkeeper::Application.find_or_create_by!(name: 'Read App', scopes: 'read', redirect_uri: '') }
|
11
|
+
let(:oauth_token) do
|
12
|
+
Doorkeeper::AccessToken.create!(
|
13
|
+
application_id: admin_app.id,
|
14
|
+
scopes: admin_app.scopes
|
15
|
+
)
|
16
|
+
end
|
17
|
+
let(:read_oauth_token) do
|
18
|
+
Doorkeeper::AccessToken.create!(
|
19
|
+
application_id: read_app.id,
|
20
|
+
scopes: read_app.scopes
|
21
|
+
)
|
22
|
+
end
|
23
|
+
let(:user_oauth_token) do
|
24
|
+
Doorkeeper::AccessToken.create!(
|
25
|
+
resource_owner_id: user.id,
|
26
|
+
application_id: admin_app.id,
|
27
|
+
scopes: admin_app.scopes
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
let(:valid_authorization) { "Bearer #{oauth_token.token}" }
|
32
|
+
let(:valid_read_authorization) { "Bearer #{read_oauth_token.token}" }
|
33
|
+
let(:valid_user_authorization) { "Bearer #{user_oauth_token.token}" }
|
34
|
+
let(:bogus_authorization) { "Bearer #{::Base64.strict_encode64('bogus:bogus')}" }
|
35
|
+
|
36
|
+
let(:Authorization) { valid_authorization }
|
37
|
+
end
|
38
|
+
|
39
|
+
shared_context 'jsonapi pagination' do
|
40
|
+
let(:page) { 1 }
|
41
|
+
let(:per_page) { '' }
|
42
|
+
parameter name: :page, in: :query, type: :integer, example: 1
|
43
|
+
parameter name: :per_page, in: :query, type: :integer, example: 50
|
44
|
+
end
|
45
|
+
|
46
|
+
JSON_API_INCLUDES_DESCRIPTION = 'Select which associated resources you would like to fetch'\
|
47
|
+
', see: <a href="https://jsonapi.org/format/#fetching-includes">'\
|
48
|
+
'https://jsonapi.org/format/#fetching-includes</a>'.freeze
|
49
|
+
JSON_API_FILTER_DESCRIPTION = ''
|
50
|
+
|
51
|
+
def json_api_include_parameter(example = '')
|
52
|
+
let(:include) { nil }
|
53
|
+
parameter name: :include, in: :query, type: :string, descripton: JSON_API_INCLUDES_DESCRIPTION, example: example
|
54
|
+
end
|
55
|
+
|
56
|
+
def json_api_filter_parameter(example = '')
|
57
|
+
let(:filter) { nil }
|
58
|
+
parameter name: :filter, in: :query, type: :string, descripton: JSON_API_FILTER_DESCRIPTION, example: example
|
59
|
+
end
|
60
|
+
|
61
|
+
shared_examples 'authentication failed' do
|
62
|
+
response '401', 'Authentication Failed' do
|
63
|
+
let(:Authorization) { bogus_authorization }
|
64
|
+
schema '$ref' => '#/components/schemas/error'
|
65
|
+
run_test!
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
shared_examples 'record not found' do
|
70
|
+
response '404', 'Record not found' do
|
71
|
+
let(:id) { 'invalid' }
|
72
|
+
schema '$ref' => '#/components/schemas/error'
|
73
|
+
run_test!
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
shared_examples 'record found' do
|
78
|
+
response '200', 'Record found' do
|
79
|
+
schema '$ref' => '#/components/schemas/resource'
|
80
|
+
run_test!
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
shared_examples 'record deleted' do
|
85
|
+
response '204', 'Record deleted' do
|
86
|
+
run_test!
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
shared_examples 'records returned' do
|
91
|
+
response '200', 'Records returned' do
|
92
|
+
schema '$ref' => '#/components/schemas/resources_list'
|
93
|
+
run_test!
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
shared_examples 'record created' do
|
98
|
+
response '201', 'record created' do
|
99
|
+
schema '$ref' => '#/components/schemas/resource'
|
100
|
+
run_test!
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
shared_examples 'record updated' do
|
105
|
+
response '200', 'record updated' do
|
106
|
+
schema '$ref' => '#/components/schemas/resource'
|
107
|
+
run_test!
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
shared_examples 'invalid request' do |param_name|
|
112
|
+
response '422', 'invalid request' do
|
113
|
+
let(param_name) { invalid_param_value }
|
114
|
+
schema '$ref' => '#/components/schemas/validation_errors'
|
115
|
+
run_test!
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# index action
|
120
|
+
shared_examples 'GET records list' do |resource_name, include_example, filter_example|
|
121
|
+
get "Returns a list of #{resource_name.pluralize}" do
|
122
|
+
tags resource_name.pluralize
|
123
|
+
security [ bearer_auth: [] ]
|
124
|
+
include_context 'jsonapi pagination'
|
125
|
+
json_api_include_parameter(include_example)
|
126
|
+
json_api_filter_parameter(filter_example)
|
127
|
+
|
128
|
+
before { records_list }
|
129
|
+
|
130
|
+
it_behaves_like 'records returned'
|
131
|
+
it_behaves_like 'authentication failed'
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# show
|
136
|
+
shared_examples 'GET record' do |resource_name, include_example|
|
137
|
+
get "Returns #{resource_name.articleize}" do
|
138
|
+
tags resource_name.pluralize
|
139
|
+
security [ bearer_auth: [] ]
|
140
|
+
parameter name: :id, in: :path, type: :string
|
141
|
+
json_api_include_parameter(include_example)
|
142
|
+
|
143
|
+
it_behaves_like 'record found'
|
144
|
+
it_behaves_like 'record not found'
|
145
|
+
it_behaves_like 'authentication failed'
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# create
|
150
|
+
shared_examples 'POST create record' do |resource_name, include_example|
|
151
|
+
param_name = resource_name.parameterize.to_sym
|
152
|
+
|
153
|
+
post "Creates #{resource_name.articleize}" do
|
154
|
+
tags resource_name.pluralize
|
155
|
+
consumes 'application/json'
|
156
|
+
security [ bearer_auth: [] ]
|
157
|
+
parameter name: param_name, in: :body, schema: { '$ref' => "#/components/schemas/#{param_name}_params" }
|
158
|
+
json_api_include_parameter(include_example)
|
159
|
+
|
160
|
+
let(param_name) { valid_create_param_value }
|
161
|
+
|
162
|
+
it_behaves_like 'record created'
|
163
|
+
it_behaves_like 'invalid request', param_name
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# update
|
168
|
+
shared_examples 'PUT update record' do |resource_name, include_example|
|
169
|
+
param_name = resource_name.parameterize.to_sym
|
170
|
+
|
171
|
+
put "Updates #{resource_name.articleize}" do
|
172
|
+
tags resource_name.pluralize
|
173
|
+
security [ bearer_auth: [] ]
|
174
|
+
consumes 'application/json'
|
175
|
+
parameter name: :id, in: :path, type: :string
|
176
|
+
parameter name: param_name, in: :body, schema: { '$ref' => "#/components/schemas/#{param_name}_params" }
|
177
|
+
json_api_include_parameter(include_example)
|
178
|
+
|
179
|
+
let(param_name) { valid_update_param_value }
|
180
|
+
|
181
|
+
it_behaves_like 'record updated'
|
182
|
+
it_behaves_like 'invalid request', param_name
|
183
|
+
it_behaves_like 'record not found'
|
184
|
+
it_behaves_like 'authentication failed'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
# destroy
|
189
|
+
shared_examples 'DELETE record' do |resource_name|
|
190
|
+
delete "Deletes #{resource_name.articleize}" do
|
191
|
+
tags resource_name.pluralize
|
192
|
+
security [ bearer_auth: [] ]
|
193
|
+
parameter name: :id, in: :path, type: :string
|
194
|
+
|
195
|
+
it_behaves_like 'record deleted'
|
196
|
+
it_behaves_like 'record not found'
|
197
|
+
it_behaves_like 'authentication failed'
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
shared_examples 'CRUD examples' do |resource_name, include_example, filter_example|
|
202
|
+
resource_path = resource_name.pluralize.parameterize
|
203
|
+
|
204
|
+
path "/api/v2/platform/#{resource_path}" do
|
205
|
+
include_examples 'GET records list', resource_name, include_example, filter_example
|
206
|
+
include_examples 'POST create record', resource_name, include_example
|
207
|
+
end
|
208
|
+
|
209
|
+
path "/api/v2/platform/#{resource_path}/{id}" do
|
210
|
+
include_examples 'GET record', resource_name, include_example
|
211
|
+
include_examples 'PUT update record', resource_name, include_example
|
212
|
+
include_examples 'DELETE record', resource_name
|
213
|
+
end
|
214
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
shared_context 'API v2 serializers params' do
|
2
|
+
let(:store) { Spree::Store.default || create(:store, default: true) }
|
3
|
+
let(:currency) { store.default_currency }
|
4
|
+
let(:locale) { store.default_locale }
|
5
|
+
|
6
|
+
let(:serializer_params) do
|
7
|
+
{
|
8
|
+
store: store,
|
9
|
+
currency: currency,
|
10
|
+
user: nil,
|
11
|
+
locale: locale
|
12
|
+
}
|
13
|
+
end
|
14
|
+
end
|
data/spree_api.gemspec
CHANGED
@@ -18,16 +18,19 @@ Gem::Specification.new do |s|
|
|
18
18
|
"source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
|
19
19
|
}
|
20
20
|
|
21
|
-
s.required_ruby_version = '>= 2.5
|
21
|
+
s.required_ruby_version = '>= 2.5'
|
22
22
|
|
23
23
|
s.files = `git ls-files`.split($\).reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
|
24
24
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
25
25
|
s.require_paths = ["lib"]
|
26
26
|
|
27
27
|
s.add_development_dependency 'jsonapi-rspec'
|
28
|
+
s.add_development_dependency 'rswag-specs'
|
29
|
+
s.add_development_dependency 'multi_json'
|
28
30
|
|
29
31
|
s.add_dependency 'spree_core', s.version
|
30
|
-
s.add_dependency 'rabl', '~> 0.14.2'
|
32
|
+
s.add_dependency 'rabl', '~> 0.14', '>= 0.14.2'
|
31
33
|
s.add_dependency 'jsonapi-serializer', '~> 2.1'
|
32
34
|
s.add_dependency 'doorkeeper', '~> 5.2', '>= 5.2.1'
|
35
|
+
s.add_dependency 'responders'
|
33
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jsonapi-rspec
|
@@ -24,25 +24,56 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rswag-specs
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: multi_json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: spree_core
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - '='
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.
|
61
|
+
version: 4.3.0.rc1
|
34
62
|
type: :runtime
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - '='
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.
|
68
|
+
version: 4.3.0.rc1
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: rabl
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.14'
|
76
|
+
- - ">="
|
46
77
|
- !ruby/object:Gem::Version
|
47
78
|
version: 0.14.2
|
48
79
|
type: :runtime
|
@@ -50,6 +81,9 @@ dependencies:
|
|
50
81
|
version_requirements: !ruby/object:Gem::Requirement
|
51
82
|
requirements:
|
52
83
|
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0.14'
|
86
|
+
- - ">="
|
53
87
|
- !ruby/object:Gem::Version
|
54
88
|
version: 0.14.2
|
55
89
|
- !ruby/object:Gem::Dependency
|
@@ -86,6 +120,20 @@ dependencies:
|
|
86
120
|
- - ">="
|
87
121
|
- !ruby/object:Gem::Version
|
88
122
|
version: 5.2.1
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: responders
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
type: :runtime
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
89
137
|
description: Spree's API
|
90
138
|
email:
|
91
139
|
- ryan@spreecommerce.com
|
@@ -97,8 +145,7 @@ files:
|
|
97
145
|
- Gemfile
|
98
146
|
- LICENSE
|
99
147
|
- Rakefile
|
100
|
-
- app/
|
101
|
-
- app/assets/javascripts/spree/api/storefront/cart.js
|
148
|
+
- app/controllers/concerns/spree/api/v2/product_list_includes.rb
|
102
149
|
- app/controllers/concerns/spree/api/v2/storefront/order_concern.rb
|
103
150
|
- app/controllers/spree/api/base_controller.rb
|
104
151
|
- app/controllers/spree/api/errors_controller.rb
|
@@ -133,6 +180,19 @@ files:
|
|
133
180
|
- app/controllers/spree/api/v1/variants_controller.rb
|
134
181
|
- app/controllers/spree/api/v1/zones_controller.rb
|
135
182
|
- app/controllers/spree/api/v2/base_controller.rb
|
183
|
+
- app/controllers/spree/api/v2/platform/addresses_controller.rb
|
184
|
+
- app/controllers/spree/api/v2/platform/classifications_controller.rb
|
185
|
+
- app/controllers/spree/api/v2/platform/cms_pages_controller.rb
|
186
|
+
- app/controllers/spree/api/v2/platform/cms_sections_controller.rb
|
187
|
+
- app/controllers/spree/api/v2/platform/countries_controller.rb
|
188
|
+
- app/controllers/spree/api/v2/platform/menu_items_controller.rb
|
189
|
+
- app/controllers/spree/api/v2/platform/menus_controller.rb
|
190
|
+
- app/controllers/spree/api/v2/platform/option_types_controller.rb
|
191
|
+
- app/controllers/spree/api/v2/platform/option_values_controller.rb
|
192
|
+
- app/controllers/spree/api/v2/platform/products_controller.rb
|
193
|
+
- app/controllers/spree/api/v2/platform/resource_controller.rb
|
194
|
+
- app/controllers/spree/api/v2/platform/taxons_controller.rb
|
195
|
+
- app/controllers/spree/api/v2/platform/users_controller.rb
|
136
196
|
- app/controllers/spree/api/v2/resource_controller.rb
|
137
197
|
- app/controllers/spree/api/v2/storefront/account/addresses_controller.rb
|
138
198
|
- app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
|
@@ -140,7 +200,9 @@ files:
|
|
140
200
|
- app/controllers/spree/api/v2/storefront/account_controller.rb
|
141
201
|
- app/controllers/spree/api/v2/storefront/cart_controller.rb
|
142
202
|
- app/controllers/spree/api/v2/storefront/checkout_controller.rb
|
203
|
+
- app/controllers/spree/api/v2/storefront/cms_pages_controller.rb
|
143
204
|
- app/controllers/spree/api/v2/storefront/countries_controller.rb
|
205
|
+
- app/controllers/spree/api/v2/storefront/menus_controller.rb
|
144
206
|
- app/controllers/spree/api/v2/storefront/order_status_controller.rb
|
145
207
|
- app/controllers/spree/api/v2/storefront/products_controller.rb
|
146
208
|
- app/controllers/spree/api/v2/storefront/stores_controller.rb
|
@@ -152,14 +214,43 @@ files:
|
|
152
214
|
- app/models/concerns/spree/user_api_methods.rb
|
153
215
|
- app/models/spree/api_configuration.rb
|
154
216
|
- app/models/spree/api_dependencies.rb
|
217
|
+
- app/serializers/concerns/spree/api/v2/resource_serializer_concern.rb
|
218
|
+
- app/serializers/spree/api/v2/base_serializer.rb
|
219
|
+
- app/serializers/spree/api/v2/platform/address_serializer.rb
|
220
|
+
- app/serializers/spree/api/v2/platform/base_serializer.rb
|
221
|
+
- app/serializers/spree/api/v2/platform/classification_serializer.rb
|
222
|
+
- app/serializers/spree/api/v2/platform/cms_page_serializer.rb
|
223
|
+
- app/serializers/spree/api/v2/platform/cms_section_serializer.rb
|
224
|
+
- app/serializers/spree/api/v2/platform/country_serializer.rb
|
225
|
+
- app/serializers/spree/api/v2/platform/image_serializer.rb
|
226
|
+
- app/serializers/spree/api/v2/platform/menu_item_serializer.rb
|
227
|
+
- app/serializers/spree/api/v2/platform/menu_serializer.rb
|
228
|
+
- app/serializers/spree/api/v2/platform/option_type_serializer.rb
|
229
|
+
- app/serializers/spree/api/v2/platform/option_value_serializer.rb
|
230
|
+
- app/serializers/spree/api/v2/platform/product_property_serializer.rb
|
231
|
+
- app/serializers/spree/api/v2/platform/product_serializer.rb
|
232
|
+
- app/serializers/spree/api/v2/platform/state_serializer.rb
|
233
|
+
- app/serializers/spree/api/v2/platform/stock_item_serializer.rb
|
234
|
+
- app/serializers/spree/api/v2/platform/stock_location_serializer.rb
|
235
|
+
- app/serializers/spree/api/v2/platform/store_serializer.rb
|
236
|
+
- app/serializers/spree/api/v2/platform/tax_category_serializer.rb
|
237
|
+
- app/serializers/spree/api/v2/platform/taxon_image_serializer.rb
|
238
|
+
- app/serializers/spree/api/v2/platform/taxon_serializer.rb
|
239
|
+
- app/serializers/spree/api/v2/platform/taxonomy_serializer.rb
|
240
|
+
- app/serializers/spree/api/v2/platform/user_serializer.rb
|
241
|
+
- app/serializers/spree/api/v2/platform/variant_serializer.rb
|
155
242
|
- app/serializers/spree/v2/storefront/address_serializer.rb
|
156
243
|
- app/serializers/spree/v2/storefront/base_serializer.rb
|
157
244
|
- app/serializers/spree/v2/storefront/cart_serializer.rb
|
245
|
+
- app/serializers/spree/v2/storefront/cms_page_serializer.rb
|
246
|
+
- app/serializers/spree/v2/storefront/cms_section_serializer.rb
|
158
247
|
- app/serializers/spree/v2/storefront/country_serializer.rb
|
159
248
|
- app/serializers/spree/v2/storefront/credit_card_serializer.rb
|
160
249
|
- app/serializers/spree/v2/storefront/estimated_shipping_rate_serializer.rb
|
161
250
|
- app/serializers/spree/v2/storefront/image_serializer.rb
|
162
251
|
- app/serializers/spree/v2/storefront/line_item_serializer.rb
|
252
|
+
- app/serializers/spree/v2/storefront/menu_item_serializer.rb
|
253
|
+
- app/serializers/spree/v2/storefront/menu_serializer.rb
|
163
254
|
- app/serializers/spree/v2/storefront/option_type_serializer.rb
|
164
255
|
- app/serializers/spree/v2/storefront/option_value_serializer.rb
|
165
256
|
- app/serializers/spree/v2/storefront/payment_method_serializer.rb
|
@@ -281,6 +372,7 @@ files:
|
|
281
372
|
- app/views/spree/api/v1/zones/show.rabl
|
282
373
|
- config/initializers/doorkeeper.rb
|
283
374
|
- config/initializers/json_api_mime_types.rb
|
375
|
+
- config/initializers/rabl.rb
|
284
376
|
- config/initializers/user_class_extensions.rb
|
285
377
|
- config/locales/en.yml
|
286
378
|
- config/routes.rb
|
@@ -289,7 +381,9 @@ files:
|
|
289
381
|
- db/migrate/20120530054546_rename_api_key_to_spree_api_key.rb
|
290
382
|
- db/migrate/20131017162334_add_index_to_user_spree_api_key.rb
|
291
383
|
- db/migrate/20180320110726_create_doorkeeper_tables.rb
|
384
|
+
- db/migrate/20210727102516_change_integer_id_columns_type.rb
|
292
385
|
- docs/oauth/index.yml
|
386
|
+
- docs/v2/platform/index.yaml
|
293
387
|
- docs/v2/storefront/index.yaml
|
294
388
|
- lib/spree/api.rb
|
295
389
|
- lib/spree/api/controller_setup.rb
|
@@ -301,6 +395,8 @@ files:
|
|
301
395
|
- lib/spree/api/testing_support/setup.rb
|
302
396
|
- lib/spree/api/testing_support/v2/base.rb
|
303
397
|
- lib/spree/api/testing_support/v2/current_order.rb
|
398
|
+
- lib/spree/api/testing_support/v2/platform_contexts.rb
|
399
|
+
- lib/spree/api/testing_support/v2/serializers_params.rb
|
304
400
|
- lib/spree_api.rb
|
305
401
|
- script/rails
|
306
402
|
- spec/fixtures/thinking-cat.jpg
|
@@ -310,9 +406,9 @@ licenses:
|
|
310
406
|
- BSD-3-Clause
|
311
407
|
metadata:
|
312
408
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
313
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.
|
409
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.3.0.rc1
|
314
410
|
documentation_uri: https://guides.spreecommerce.org/
|
315
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.
|
411
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.3.0.rc1
|
316
412
|
post_install_message:
|
317
413
|
rdoc_options: []
|
318
414
|
require_paths:
|
@@ -321,12 +417,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
321
417
|
requirements:
|
322
418
|
- - ">="
|
323
419
|
- !ruby/object:Gem::Version
|
324
|
-
version: 2.5
|
420
|
+
version: '2.5'
|
325
421
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
326
422
|
requirements:
|
327
|
-
- - "
|
423
|
+
- - ">"
|
328
424
|
- !ruby/object:Gem::Version
|
329
|
-
version:
|
425
|
+
version: 1.3.1
|
330
426
|
requirements: []
|
331
427
|
rubygems_version: 3.2.3
|
332
428
|
signing_key:
|