title: How to annotate array of objects response in Swagger
body: <p>I have to debug a REST API Java project that has been developed using Swagger.I'm new to it, so I'm a little bit confused on how to do certain things. For example, here's one method:</p>
  <pre><code>@GET
  @Path(&quot;/location/name&quot;)
  @Produces({MediaType.APPLICATION_JSON})
  @Operation(
      summary = &quot;Get location information&quot;,
      tags = {&quot;Information&quot;},
      responses = {
          @ApiResponse(responseCode = &quot;200&quot;, content = @Content(schema = @Schema(implementation = LocationResponse.class)), description = &quot;Get location information&quot;),
          @ApiResponse(responseCode = &quot;500&quot;, description = &quot;Error: Internal Server Error&quot;)
      }
  )
  public Response searchLocationByName(
      @Parameter(description = &quot;Location name&quot;, required = true) @DefaultValue(&quot;Barcelona&quot;) @QueryParam(&quot;name&quot;) String locationName
  ) { /* METHOD CODE */ }
  </code></pre>
  <p>The <code>@ApiResponse</code> for the code 200 is not of type <code>LocationResponse</code> but of type <code>ArrayList&lt;LocationResponse&gt;</code>, as it can return more than one location. What would be the correct syntax for this change? I've been reading the documentation at <a href="https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations#operation-annotations" rel="noreferrer">https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations#operation-annotations</a> but I couldn't find an appropriate example...</p>
  <p>Thanks!</p>