solidus_json_api
solidus_json_api copied to clipboard
A JSON API for Solidus.
Solidus JSON API
A JSON API for Solidus.
Documentation: http://solidusapi.wildcardlabs.com
Installation
Add solidus_json_api to your Gemfile:
gem 'solidus_json_api', github: 'wildcardlabs/solidus_json_api'
Road to 1.0
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.
- [x] Add support for pagination.
- [x]
page
keyword support for pagination. - [x]
links
document at the root forself
,next
,prev
,last
, andfirst
.
- [x]
- [ ] Add support for filtration.
- [x] 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
- [ ]
- [x]
status
- [x]
code
- [x]
title
- [x]
detail
- [ ]
source
- [x]
pointer
- [ ]
parameter
- [x]
- [x]
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 | [ ] | [x] | [ ] | [ ] | [ ] |
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 | [ ] | [ ] | [ ] | [ ] | [ ] |
Testing
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