resourcejs
resourcejs copied to clipboard
An minimalistic Express.js library that will reflect a Mongoose model onto a RESTful interface with a splash of Swagger.io love.
**ERR** ``` {message: "Request failed with status code 500", name: "Error", description: undefined, number: undefined, fileName: undefined, …} code: undefined columnNumber: undefined config: adapter: ƒ xhrAdapter(config) data: undefined headers: {Accept:...
I want to get all records present in mongodb database. I've used var Resource = require('resourcejs'); module.exports = function(app, route) { // Setup the controller for REST; Resource(app, '', route,...
Can't see the swagger UI
I followed the documentation to set server side code. Everything else works fine, but for some reason ?limit and ?skip in url does not work. i am getting: { "status":...
https://github.com/travist/resourcejs/blob/master/Resource.js#L559 When the before hook is called, it passes `search` as the `item` instead of `query`. Why is that? It makes it harder to write hooks because `index()` passes the...
There are a bunch of things that can be set on `req` in a before handler that will affect how the endpoints behave. It'd be great if all of those...
before/after handlers are well documented, but it takes a while of digging through the code to understand how `hooks` are subtly different.
I'm getting error 500 on `GET /resource` requests, when `resources` is empty collection in MongoDB. Can you return code 200 and empty array instead?
"Populate" doesn't work with lists of objects. This test will fail: ``` it('Should not populate paths that are not a reference', function(done) { request(app) .get('/test/resource1?name=noage&populate=list') .end(function(err, res) { if (err)...
In both of the ways of specifying an embedded object below, the field in the parent of the embedded object does not appear in the Model Schema: ``` Schema =...