You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In beneathPath(), paths with an array work now, thanks to #473 and 9e1ba8a. But I'm still having a problem with arrays when there are two levels of arrays in the payload.
Consider the payload:
document(snippetName,
responseFields(
// beneathPath understands that roles is an array and does the right thingbeneathPath("roles").withSubsectionId("roles"),
fieldWithPath("key").description("key"),
fieldWithPath("name").description("name"),
subsectionWithPath("more").description("array")));
This will give me the fields of roles with a description of the more property. To then document the object within the more array, I do a separate snippet:
document(snippetName,
responseFields(
// now beneathPath doesn't deal with 'roles' here like it does abovebeneathPath("roles[].more").withSubsectionId("more"),
fieldWithPath("[].id").description("id")));
The issue here is that at this point, the second array, the problem is the same as #473, you get a snippet with [] in front of the field path, which is functional, but not great from a documentation standpoint, which is the whole point.
To make this work like the single array, I'd expect maybe beneathPath("roles.more") to work with fieldWithPath("id"), giving me a table with Paths like id in this case.
The text was updated successfully, but these errors were encountered:
In
beneathPath()
, paths with an array work now, thanks to #473 and 9e1ba8a. But I'm still having a problem with arrays when there are two levels of arrays in the payload.Consider the payload:
And I document it like so:
This will give me the fields of
roles
with a description of themore
property. To then document the object within themore
array, I do a separate snippet:The issue here is that at this point, the second array, the problem is the same as #473, you get a snippet with
[]
in front of the field path, which is functional, but not great from a documentation standpoint, which is the whole point.To make this work like the single array, I'd expect maybe
beneathPath("roles.more")
to work withfieldWithPath("id")
, giving me a table withPath
s likeid
in this case.The text was updated successfully, but these errors were encountered: