The second version of the Spree API that's JSON API compatible.
Documentation: http://spree-contrib.github.io/spree_api_v2
Add spree_api_v2 to your Gemfile:
gem 'spree_api_v2', github: 'spree-contrib/spree_api_v2'
Please note that there actually has been a lot of work done. The lack of checked off boxes doesn't give this gem the respect it deserves.
There's several things blocking 1.0. Below, you'll see a bullet list of requirements that are both specific to the app, the JSON API spec, and third parties.
- Manage permissions with CanCanCan.
- Add support for XML.
- Add support for pagination.
-
page
keyword support for pagination. -
links
document at the root forself
,next
,prev
,last
, andfirst
.
-
- Add support for filtration.
- Be able to filter onto the main data object.
- Be able to filter the included relationships.
- Provide JSON API specific error objects. Provide support for:
-
id
-
links
-
about
-
-
status
-
code
-
title
-
detail
-
source
-
pointer
-
parameter
-
-
meta
-
- Only accept data in the JSON API format.
- Respond with header
Content-Type: application/vnd.api+json
. - Add support for sparse fieldsets.
- Add support for sorting.
Resource | index | create | show | update | destroy |
---|---|---|---|---|---|
Adjustment | [ ] | [ ] | [ ] | [ ] | [ ] |
Address | [ ] | [ ] | [ ] | [ ] | [ ] |
Checkout | [ ] | [ ] | [ ] | [ ] | [ ] |
Country | [x] | [ ] | [x] | [ ] | [ ] |
Image | [x] | [ ] | [x] | [ ] | [ ] |
Line Item | [ ] | nw | [ ] | [ ] | [ ] |
Option Type | [x] | [ ] | [x] | [ ] | [ ] |
Option Value | [x] | [ ] | [x] | [ ] | [ ] |
Order | [x] | [ ] | [x] | [ ] | [ ] |
Payment | [ ] | [ ] | [ ] | [ ] | [ ] |
Price | [x] | [ ] | [x] | [ ] | [ ] |
Product | [x] | [ ] | [x] | [ ] | [ ] |
Product Property | [ ] | [ ] | [ ] | [ ] | [ ] |
Return Auth | [ ] | [ ] | [ ] | [ ] | [ ] |
Shipment | [ ] | [ ] | [ ] | [ ] | [ ] |
State | [x] | [ ] | [x] | [ ] | [ ] |
Stock Location | [ ] | [ ] | [ ] | [ ] | [ ] |
Stock Movement | [ ] | [ ] | [ ] | [ ] | [ ] |
Stock Item | [ ] | [ ] | [ ] | [ ] | [ ] |
Store | [ ] | [ ] | [ ] | [ ] | [ ] |
Store Credit | [ ] | [ ] | [ ] | [ ] | [ ] |
Tax Category | [ ] | [ ] | [ ] | [ ] | [ ] |
Tax Rate | [ ] | [ ] | [ ] | [ ] | [ ] |
Taxon | [x] | [ ] | [x] | [ ] | [ ] |
Taxonomy | [x] | [ ] | [x] | [ ] | [ ] |
User | [x] | [ ] | [x] | [ ] | [ ] |
Variant | [x] | [ ] | [x] | [ ] | [ ] |
Zone | [ ] | [ ] | [ ] | [ ] | [ ] |
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run the specs.
The dummy app can be regenerated by using rake test_app
.
bundle && bundle exec rake
Copyright © 2015 Ben A. Morgan, released under the New BSD License