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
Documenting the following fields should be sufficient for the payload to be considered fully documented:
count
items[].k1
items[].k2[].name
Instead, REST Docs reports that items[].k2 has not been documented.
When items[].k2[].name is documented, it's removed from its containing object. The object then becomes empty and it's removed from its parent array. This parent array, items[].k2 then becomes empty so it is removed from items. This only works for the second items[].k2 entry in the payload. The first items[].k2 entry is unaffected because it's empty to begin with. As a result, there's no removal of the name entry to trigger the cascading removal of empty containers (objects or arrays).
The text was updated successfully, but these errors were encountered:
Taken from this question on Stack Overflow, consider the following JSON payload:
Documenting the following fields should be sufficient for the payload to be considered fully documented:
count
items[].k1
items[].k2[].name
Instead, REST Docs reports that
items[].k2
has not been documented.When
items[].k2[].name
is documented, it's removed from its containing object. The object then becomes empty and it's removed from its parent array. This parent array,items[].k2
then becomes empty so it is removed fromitems
. This only works for the seconditems[].k2
entry in the payload. The firstitems[].k2
entry is unaffected because it's empty to begin with. As a result, there's no removal of thename
entry to trigger the cascading removal of empty containers (objects or arrays).The text was updated successfully, but these errors were encountered: