Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root option documentation #1698

Closed
stevelacey opened this issue Oct 27, 2017 · 1 comment
Closed

Root option documentation #1698

stevelacey opened this issue Oct 27, 2017 · 1 comment

Comments

@stevelacey
Copy link

Maybe I am missing the point... but I don't understand how, why or when the root option works – I am putting it in all sorts of places, on get/post, on namespaces/resources, on CollectionSerializer constructs... and it is never doing what I expect.

I am expecting root: 'user' to change output from:

{
  "name": "steve"
}

to

{
  "user": {
    "name": "steve"
  }
}

or at the very least to do that on collections given that's what it appears to be aimed at – so users on an array in that case

I see past issues that this changed at some point, is there documentation missing around this?

@stevelacey stevelacey changed the title Root documentation Root option documentation Oct 27, 2017
@stevelacey
Copy link
Author

stevelacey commented Oct 27, 2017

Wrong repo oops ✌️ ruby-grape/grape-active_model_serializers#81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant