docs: def get_json_lines(annotation: ResourceAnnotation, field: str, route: str,
                     request: bool = False) -> List:
      """Generate documentation lines for the given annotation.
  
      This only documents schemas of type "object", or type "list" where each
      "item" is an object. Other types are ignored (but a warning is logged).
  
      :param doctor.resource.ResourceAnnotation annotation:
          Annotation object for the associated handler method.
      :param str field: Sphinx field type to use (e.g. '<json').
      :param str route: The route the annotation is attached to.
      :param bool request: Whether the resource annotation is for the request or
          not.
      :returns: list of strings, one for each line.
      """
      url_params = URL_PARAMS_RE.findall(route)
      if not request:
          return_type = annotation.logic._doctor_signature.return_annotation
          # Check if our return annotation is a Response that supplied a
          # type we can use to document.  If so, use that type for api docs.
          # e.g. def logic() -> Response[MyType]
          if issubclass(return_type, Response):
              if return_type.__args__ is not None:
                  return_type = return_type.__args__[0]
          if issubclass(return_type, Array):
              if issubclass(return_type.items, Object):
                  properties = return_type.items.properties
                  field += 'arr'
              else:
                  return []
          elif issubclass(return_type, Object):
              properties = return_type.properties
          else:
              return []
      else:
          # If we defined a req_obj_type for the logic, use that type's
          # properties instead of the function signature.
          if annotation.logic._doctor_req_obj_type:
              properties = annotation.logic._doctor_req_obj_type.properties
          else:
              parameters = annotation.annotated_parameters
              properties = {k: p.annotation for k, p in parameters.items()}
      return get_json_object_lines(annotation, properties, field, url_params,
                                   request)