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

Implicitly Include All Fields on Nested Objects #32

Open
stevenhurth opened this issue Sep 28, 2016 · 1 comment
Open

Implicitly Include All Fields on Nested Objects #32

stevenhurth opened this issue Sep 28, 2016 · 1 comment

Comments

@stevenhurth
Copy link

Currently, if we've excluded all fields from a response and are only specifying included fields, in order to include all fields of a nested object, we must qualify it with the .* notation. One minor improvement I'd like to request would be to implicitly derive that when just using the object name.

So, if I have objects:

class MyObject {
    List<NestedObject> nested = new ArrayList<>();
    ...
}

class NestedObject {
    String value = UUID.randomUUID().toString();
    ...
}

We have to use the include fields 'nested.*'. It would be great if we could just use 'nested' to accomplish the same thing.

@darlanmendonca
Copy link

probably will be better if by default, include nested keys, and accept too specify what keys, using dot syntax, e.g.

{foo: 'foo', bar: {key1: '', key2: ''}}
// instead use bar.*, only name of key include all keys
"foo, bar" // => {foo: 'foo', bar: {key1: '', key2: ''}}

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

2 participants