JSONAPI support for loopback.
This project is a work in progress. Consider it alpha software. I am VERY interested in help to get this module over the line. See the issue tracker
Currently supported:
- Find all records via GET
- Find a record by ID via GET
- Create via POST
- Update a record via PATCH
- Delete a record via DELETE
- 422 Error output in JSON API format (validation errors)
- Some 500 errors are formatted in JSON API format
Not yet properly supported:
- hasMany relations
- hasOne relations
- belongsTo relations
- 404 Errors are not yet correctly formatted
- Some 500 Errors are not yet correctly formatted
In your loopback project:
npm install --save loopback-component-jsonapi
- Create a
component-config.json
file in your server folder (if you don't already have one) - Add the following config to
component-config.json
{
"loopback-component-jsonapi": {
"restApiRoot": "/api"
}
}