keithwhor / nodal

API Services Made Easy With Node.js

Home Page:http://www.nodaljs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adapter for building RESTfull api json structures

mattdharmon opened this issue · comments

I would love an adapter for building RESTfull api json structures.

I.E.:

HAL (http://stateless.co/hal_specification.html)
HATEOS (https://spring.io/guides/gs/rest-hateoas/)

The reason being, it gives me more control over what is pushed to the client (so I don't accidentally send out a hashed password for example).

Can you give an example of how you think this might work overall? I'm having trouble understanding the issue --- hashed passwords can be controlled with MyModel.hides('password') in the Model definition, and otherwise you have complete control over the nesting / interface of your model in the .respond() method.

Closing this because I haven't heard back yet. Let me know if you have more comments.