title: Java Swagger not generating service where endpoint response type is List<T>
body: <p>I am trying to use swagger with java.
  Using NSwag studio I am able to generate all my endpoints except one that returns a list of objects.
  Here is my action in controller:</p>
  
  <pre><code>@ApiOperation(value = "getAll", nickname = "getAll", responseContainer = "List", response = DiakEntity.class)
  @GetMapping("/api/diakok")
  @ResponseBody
  @PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_CLIENT')")
  public List&lt;DiakEntity&gt; GetDiakok() throws Exception
  {
      ServiceObjectResponse&lt;List&lt;DiakEntity&gt;&gt; request = _diakService.getAll();
  
      if(!request.getIsSuccess())
      {
          throw new Exception(request.getMessage());
      }
      return request.getObject();
  }
  </code></pre>
  
  <p>I am using swagger-annotations 1.5.23, springfox-swagger-ui 2.9.2, springfox-swagger2 2.9.2.
  If I test from Postman it works.</p>
  
  <p>Also tried like this:</p>
  
  <pre><code>@ApiOperation(value = "getAll", nickname = "getAll")
      @ApiResponse(code = 200, responseContainer="List", response=DiakEntity.class, message = "Gets all diak objects")
      @GetMapping("/api/diakok")
      @ResponseBody
      @PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_CLIENT')")
      public ResponseEntity&lt;List&lt;DiakEntity&gt;&gt; GetDiakok() throws Exception
      {
          ServiceObjectResponse&lt;List&lt;DiakEntity&gt;&gt; request = _diakService.getAll();
  
          if(!request.getIsSuccess())
          {
              throw new Exception(request.getMessage());
          }
  
          return new ResponseEntity&lt;&gt;(request.getObject(), HttpStatus.OK);
      }
  </code></pre>
  
  <p>thnx</p>