Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Router from 'koa-router'
import compose from 'koa-compose'
import Model from './model'
import Collection from 'bookshelf/lib/collection'
import paginate from 'koa-pagination'
import convert from 'koa-convert'
import joi_to_json_schema from 'joi-to-json-schema'
import jsf from 'json-schema-faker'
import Joi from 'joi'
import _ from 'lodash'
import pluralize from 'pluralize'
Router.define = function (options) {
let {setup, ...rest} = options;
if (_.isFunction(options)) {
setup = options;
options = {};
}
options = rest || options;
setup = setup || (router => router)
let router = new Router(options);
setup(router);
return router;
}
Router.prototype.schema = function () {
return null;
}