hapi json-api plugin
JavaScript
Latest commit 4fea99a Nov 30, 2016 @wraithgar committed on GitHub Merge pull request #32 from wraithgar/greenkeeper-hapi-16.0.0
Update hapi to version 16.0.0 πŸš€

README.md

@gar/hapi-json-api

hapi plugin for enabling/enforcing json-api

Build Status NSP Status

installing

npm install @gar/hapi-json-api

use

//where server is a hapi server

server.register({
    register: require('@gar/hapi-json-api')
    options: {}
});

options

Pass an optional meta parameter to options to have that included in the meta response namespace for all replies from your server

notes

Assumes the objects coming back from your handlers return data in proper json-api format. No validation yet.

Rewrites Boom errors to be spec compliant.

Enforces Accept/Content-type rules defined in spec