diff --git a/docs/src/docs/asciidoc/documenting-your-api.adoc b/docs/src/docs/asciidoc/documenting-your-api.adoc index c7a184cb..840171c9 100644 --- a/docs/src/docs/asciidoc/documenting-your-api.adoc +++ b/docs/src/docs/asciidoc/documenting-your-api.adoc @@ -167,6 +167,23 @@ The following paths are all present: |=== +A response that uses an array at its root can also be documented. The path `[]` will refer +to the entire array. You can then use bracket or dot notation to identify fields within +the array's entries. For example, `[].id` corresponds to the `id` field of every object +found in the following array: + +[source,json,indent=0] +---- + [ + { + "id":1 + }, + { + "id":2 + } + ] +---- + [[documenting-your-api-request-response-payloads-json-field-types]]