mac- / ratify

A Hapi plugin for validating the schema of path, query, request body, and response body params using JSON-schema
MIT License
71 stars 27 forks source link

Documentation to register plugin with options is not accurate for Hapi 6.x.x #6

Closed dschenkelman closed 10 years ago

dschenkelman commented 10 years ago

It reads:

var ratifyOptions = {};

server.pack.register({ plugin: require('ratify') }, ratifyOptions, function(err) {
    if (err) {
        console.log('error', 'Failed loading plugin: ratify');
    }
});

It should be:

var ratifyOptions = {};

server.pack.register({ plugin: require('ratify'), options: ratifyOptions }, function(err) {
    if (err) {
        console.log('error', 'Failed loading plugin: ratify');
    }
});