code: func (o *ListTasksOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
  
  	// response header X-Last-Task-Id
  
  	xLastTaskID := swag.FormatInt64(o.XLastTaskID)
  	if xLastTaskID != "" {
  		rw.Header().Set("X-Last-Task-Id", xLastTaskID)
  	}
  
  	rw.WriteHeader(200)
  	payload := o.Payload
  	if payload == nil {
  		// return empty array
  		payload = make([]*models.TaskCard, 0, 50)
  	}
  
  	if err := producer.Produce(rw, payload); err != nil {
  		panic(err) // let the recovery middleware deal with this
  	}
  }
docs: // WriteResponse to the client