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

Support array indices in JSON field paths #468

Open
mariusoe opened this issue Dec 15, 2017 · 2 comments
Open

Support array indices in JSON field paths #468

mariusoe opened this issue Dec 15, 2017 · 2 comments

Comments

@mariusoe
Copy link

Hi,

when using a PayloadSubsectionExtractor (e.g. FieldPathPayloadSubsectionExtractor) to extract a subsection of a JSON payload, array indices are ignored.

I would assume that when a path is used like Outer[].Nested[0].Attribute only the first (in this example Nested) element or which is matching the specified index will match the given path and, thus, returned. But it extracts always all elements which results in a PayloadHandlingException({PATH} + " does not uniquely identify a subsection of the payload").

@wilkinsona
Copy link
Member

That's working as (currently) designed. There's no support for array indices anywhere in REST Docs at the moment.

@wilkinsona wilkinsona changed the title PayloadSubsectionExtractor is ignoring array indices. Support array indices in JSON field paths Jan 2, 2018
@dibog
Copy link

dibog commented May 11, 2020

+1 from me for the enhancement request

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

No branches or pull requests

3 participants