mcordell / grape_token_auth

Token auth for grape apps
MIT License
52 stars 19 forks source link

Customise presented response (remove :data key + use Grape::Entity)? #38

Open qd3v opened 8 years ago

qd3v commented 8 years ago

Hi! I'm working on a new project, and want to use presenters in a Grape for a first time. Is there any way I can customise the response in a way described in the subj (not just whitelist attrs)? Example of #present output what needs to be customised: https://github.com/mcordell/grape_token_auth/blob/v0.1.0/lib/grape_token_auth/apis/registration_api.rb#L44

mcordell commented 7 years ago

Hi @vanburg I have a preliminary implementation of this feature in the branch refactor-responses if you would like to check it out and give me feedback, that would be great. Directions for use are in the README there is also a feature spec that corresponds to the behavior you are looking for.