{
  "openapi": "3.0.3",
  "info": {
    "title": "Projects Public API",
    "description": "API pública versionada de Projetos/Kanban. Autenticação via Authorization: Bearer <chave> (chave gerada em Projetos → API). A chave herda as permissões ACL/RBAC do utilizador. Escopos: read ou write. Escritas de cards geram snapshot (TTL 5 dias). Use POST cards/bulk com dry_run para validar e aplicar várias operações com um único snapshot. Colunas Concluído/Done preenchem completed_at; sair de Bloqueio limpa is_blocked. v1.8: GET /workspaces/ (clientes com id), modelos de formulário (/form-templates/), vínculo a projeto (/forms/) e leitura de respostas. v1.7.1: epic_id gravável em POST/PATCH card e bulk update_card/create_card (vínculo task→épico). v1.7: colunas do quadro de projetos existentes (criar, renomear/recolorir, reordenar, remover). v1.6: criar projeto (POST /) e modelos de projeto (listar, detalhar e editar dados, colunas, automações, sprints e cards padrão). v1.5: membros do projeto, labels, checklists de card (CRUD + itens). v1.4: sprints (CRUD ciclo ativar/encerrar), planning, automações Kanban e documentos do projeto.",
    "version": "1.8.0"
  },
  "servers": [
    {
      "url": "https://taskfy.tec.br"
    }
  ],
  "components": {
    "securitySchemes": {
      "ProjectApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "erp_proj_…",
        "description": "Chave da API de Projetos (prefixo erp_proj_)."
      }
    }
  },
  "security": [
    {
      "ProjectApiKey": []
    }
  ],
  "paths": {
    "/api/v1/projects/": {
      "get": {
        "summary": "Listar projetos visíveis",
        "operationId": "listProjects",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Lista de projetos"
          },
          "401": {
            "description": "Chave inválida"
          }
        }
      },
      "post": {
        "summary": "Criar projeto (opcionalmente a partir de um modelo)",
        "operationId": "createProject",
        "tags": [
          "Projects"
        ],
        "description": "Exige escopo write e permissão projects.manage. Com template_id, copia colunas, automações, sprints e cards padrão do modelo. Sem workspace_id o projeto fica interno (empresa admin). gestor_id e project_manager_id assumem o dono da chave se omitidos.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "workspace_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "template_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "id de GET /templates/"
                  },
                  "gestor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "project_manager_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "planning",
                      "in_progress",
                      "paused",
                      "done"
                    ]
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Projeto criado"
          },
          "400": {
            "description": "Validação (errors por campo)"
          },
          "403": {
            "description": "Sem permissão, escopo read ou módulo/plano"
          }
        }
      }
    },
    "/api/v1/projects/workspaces/": {
      "get": {
        "summary": "Listar clientes/workspaces com id",
        "operationId": "listWorkspaces",
        "tags": [
          "Workspaces"
        ],
        "description": "Mesmo conjunto do select Cliente ao criar projeto. Use id com is_admin_workspace=false como workspace_id em POST /. Omita workspace_id para projeto interno (empresa admin).",
        "responses": {
          "200": {
            "description": "workspaces[] com id, name, document, workspace_type, is_admin_workspace"
          }
        }
      }
    },
    "/api/v1/projects/form-templates/": {
      "get": {
        "summary": "Listar modelos de formulário",
        "operationId": "listFormTemplates",
        "tags": [
          "Form templates"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "form_templates[]"
          }
        }
      },
      "post": {
        "summary": "Criar modelo de formulário",
        "operationId": "createFormTemplate",
        "tags": [
          "Form templates"
        ],
        "description": "Exige escopo write e permissão para gerir formulários (membro do workspace admin ou do workspace do modelo).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "primary_color": {
                    "type": "string",
                    "example": "#F5544D"
                  },
                  "welcome_title": {
                    "type": "string"
                  },
                  "welcome_body": {
                    "type": "string"
                  },
                  "success_title": {
                    "type": "string"
                  },
                  "success_body": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "form_template"
          }
        }
      }
    },
    "/api/v1/projects/form-templates/{template_id}/": {
      "get": {
        "summary": "Detalhe do modelo (com campos)",
        "operationId": "getFormTemplate",
        "tags": [
          "Form templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          }
        ],
        "responses": {
          "200": {
            "description": "form_template"
          }
        }
      },
      "patch": {
        "summary": "Atualizar modelo de formulário",
        "operationId": "patchFormTemplate",
        "tags": [
          "Form templates"
        ],
        "description": "Exige escopo write e permissão para gerir formulários (membro do workspace admin ou do workspace do modelo).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "primary_color": {
                    "type": "string",
                    "example": "#F5544D"
                  },
                  "welcome_title": {
                    "type": "string"
                  },
                  "welcome_body": {
                    "type": "string"
                  },
                  "success_title": {
                    "type": "string"
                  },
                  "success_body": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "form_template"
          }
        }
      },
      "delete": {
        "summary": "Remover modelo (soft delete)",
        "operationId": "deleteFormTemplate",
        "tags": [
          "Form templates"
        ],
        "description": "Exige escopo write e permissão para gerir formulários (membro do workspace admin ou do workspace do modelo).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          }
        ],
        "responses": {
          "200": {
            "description": "deleted"
          }
        }
      }
    },
    "/api/v1/projects/form-templates/{template_id}/fields/": {
      "get": {
        "summary": "Listar campos do modelo",
        "operationId": "listFormTemplateFields",
        "tags": [
          "Form templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          }
        ],
        "responses": {
          "200": {
            "description": "fields[]"
          }
        }
      },
      "post": {
        "summary": "Adicionar campo ao modelo",
        "operationId": "createFormTemplateField",
        "tags": [
          "Form templates"
        ],
        "description": "Exige escopo write e permissão para gerir formulários (membro do workspace admin ou do workspace do modelo).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Chave do campo (slug)"
                  },
                  "label": {
                    "type": "string"
                  },
                  "field_type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "email",
                      "textarea",
                      "phone",
                      "select",
                      "section"
                    ],
                    "description": "section = título de seção / nova página (etapa) no formulário público"
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Obrigatório para field_type=select"
                  },
                  "description": {
                    "type": "string",
                    "description": "Texto da seção (field_type=section), gravado em metadata.description"
                  }
                },
                "required": [
                  "label"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "field"
          }
        }
      }
    },
    "/api/v1/projects/form-templates/{template_id}/fields/reorder/": {
      "post": {
        "summary": "Reordenar campos (lista completa de ids)",
        "operationId": "reorderFormTemplateFields",
        "tags": [
          "Form templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "field_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "field_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "fields[]"
          }
        }
      }
    },
    "/api/v1/projects/form-templates/{template_id}/fields/{field_id}/": {
      "patch": {
        "summary": "Atualizar campo do modelo",
        "operationId": "patchFormTemplateField",
        "tags": [
          "Form templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          },
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Chave do campo (slug)"
                  },
                  "label": {
                    "type": "string"
                  },
                  "field_type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "email",
                      "textarea",
                      "phone",
                      "select",
                      "section"
                    ],
                    "description": "section = título de seção / nova página (etapa) no formulário público"
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Obrigatório para field_type=select"
                  },
                  "description": {
                    "type": "string",
                    "description": "Texto da seção (field_type=section), gravado em metadata.description"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "field"
          }
        }
      },
      "delete": {
        "summary": "Remover campo do modelo",
        "operationId": "deleteFormTemplateField",
        "tags": [
          "Form templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          },
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "deleted"
          }
        }
      }
    },
    "/api/v1/projects/form-templates/{template_id}/publish/": {
      "post": {
        "summary": "Publicar link da empresa (sem projeto)",
        "operationId": "publishFormTemplate",
        "tags": [
          "Form templates"
        ],
        "description": "Exige escopo write e permissão para gerir formulários (membro do workspace admin ou do workspace do modelo).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shareable": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "form_instance com share_uuid e public_url"
          }
        }
      }
    },
    "/api/v1/projects/form-templates/{template_id}/responses/": {
      "get": {
        "summary": "Respostas da instância publicada da empresa",
        "operationId": "listFormTemplateResponses",
        "tags": [
          "Form templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "id do modelo de formulário (form-templates)"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                20,
                50,
                100
              ]
            },
            "description": "Padrão 20"
          }
        ],
        "responses": {
          "200": {
            "description": "responses[] paginado"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/forms/": {
      "get": {
        "summary": "Listar formulários vinculados ao projeto",
        "operationId": "listProjectForms",
        "tags": [
          "Project forms"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "forms[]"
          }
        }
      },
      "post": {
        "summary": "Vincular modelo ao projeto (clona campos)",
        "operationId": "attachProjectForm",
        "tags": [
          "Project forms"
        ],
        "description": "Exige escopo write e ACL de escrita no projeto.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shareable": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "template_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "form"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/forms/{instance_id}/": {
      "get": {
        "summary": "Detalhe do formulário do projeto",
        "operationId": "getProjectForm",
        "tags": [
          "Project forms"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "form"
          }
        }
      },
      "patch": {
        "summary": "Atualizar settings do formulário",
        "operationId": "patchProjectForm",
        "tags": [
          "Project forms"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "is_shareable": {
                    "type": "boolean"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "private"
                    ]
                  },
                  "page_password": {
                    "type": "string",
                    "description": "Nova senha (privado); omitir para manter"
                  },
                  "description": {
                    "type": "string"
                  },
                  "welcome_title": {
                    "type": "string"
                  },
                  "welcome_body": {
                    "type": "string"
                  },
                  "success_title": {
                    "type": "string"
                  },
                  "success_body": {
                    "type": "string"
                  },
                  "primary_color": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "form"
          }
        }
      },
      "delete": {
        "summary": "Remover formulário do projeto (soft delete)",
        "operationId": "deleteProjectForm",
        "tags": [
          "Project forms"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "deleted"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/forms/{instance_id}/responses/": {
      "get": {
        "summary": "Listar respostas do formulário",
        "operationId": "listProjectFormResponses",
        "tags": [
          "Project forms"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                20,
                50,
                100
              ]
            },
            "description": "Padrão 20"
          }
        ],
        "responses": {
          "200": {
            "description": "responses[] paginado"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/forms/{instance_id}/responses/{response_id}/": {
      "get": {
        "summary": "Detalhe de uma resposta",
        "operationId": "getProjectFormResponse",
        "tags": [
          "Project forms"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "response_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response com values[]"
          }
        }
      }
    },
    "/api/v1/projects/templates/": {
      "get": {
        "summary": "Listar modelos de projeto",
        "operationId": "listTemplates",
        "tags": [
          "Templates"
        ],
        "description": "Padrão: modelos ativos disponíveis para criar projeto (filtre por cliente com workspace_id). editable=1 lista os modelos que a chave pode editar, inclusive inativos.",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "editable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "templates[] com can_edit"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/": {
      "get": {
        "summary": "Detalhe do modelo (colunas + automações, sprints, cards)",
        "operationId": "getTemplate",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "template"
          },
          "404": {
            "description": "Não encontrado"
          }
        }
      },
      "patch": {
        "summary": "Atualizar dados do modelo (scope/workspace não editáveis)",
        "operationId": "patchTemplate",
        "tags": [
          "Templates"
        ],
        "description": "Exige escopo write e papel owner/admin de workspace admin (mesma regra de Configurações → Modelos).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "project_mode": {
                    "type": "string",
                    "enum": [
                      "stages",
                      "sprints",
                      "hybrid"
                    ]
                  },
                  "sprint_policy": {
                    "type": "string",
                    "enum": [
                      "one_at_a_time",
                      "planned_sequence",
                      "automatic_sequence"
                    ]
                  },
                  "show_planning_tab": {
                    "type": "boolean"
                  },
                  "show_demands_tab": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "order": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "template atualizado"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/columns/": {
      "post": {
        "summary": "Adicionar coluna ao modelo",
        "operationId": "createTemplateColumn",
        "tags": [
          "Templates"
        ],
        "description": "Exige escopo write e papel owner/admin de workspace admin (mesma regra de Configurações → Modelos).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "color": {
                    "type": "string",
                    "description": "Hex #RRGGBB"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "column"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/columns/reorder/": {
      "post": {
        "summary": "Reordenar colunas (lista completa de ids)",
        "operationId": "reorderTemplateColumns",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "column_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "column_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "template"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/columns/{column_id}/": {
      "patch": {
        "summary": "Renomear/recolorir coluna do modelo",
        "operationId": "patchTemplateColumn",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "color": {
                    "type": "string",
                    "description": "Hex #RRGGBB"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "column"
          }
        }
      },
      "delete": {
        "summary": "Remover coluna do modelo (reordena as restantes)",
        "operationId": "deleteTemplateColumn",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removida"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/columns/{column_id}/automations/": {
      "put": {
        "summary": "Substituir automações da coluna do modelo",
        "operationId": "replaceTemplateColumnAutomations",
        "tags": [
          "Templates"
        ],
        "description": "Lista vazia remove todas. preset_slug vem de GET /{project_id}/automations/ (presets). Presets agendados não são aceitos.",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "automations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "preset_slug"
                      ],
                      "properties": {
                        "preset_slug": {
                          "type": "string"
                        },
                        "params": {
                          "type": "object",
                          "description": "business_days, label_names, target_column_name, notification_*, match_checklist_title"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "automations"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "column com automations"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/sprints/": {
      "post": {
        "summary": "Adicionar sprint padrão ao modelo",
        "operationId": "createTemplateSprint",
        "tags": [
          "Templates"
        ],
        "description": "Exige escopo write e papel owner/admin de workspace admin (mesma regra de Configurações → Modelos).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 180
                  },
                  "duration_amount": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "duration_unit": {
                    "type": "string",
                    "enum": [
                      "weeks",
                      "days"
                    ]
                  },
                  "goal": {
                    "type": "string"
                  },
                  "auto_start": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "sprint"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/sprints/reorder/": {
      "post": {
        "summary": "Reordenar sprints padrão (lista completa de ids)",
        "operationId": "reorderTemplateSprints",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sprint_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "sprint_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "template"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/sprints/{sprint_id}/": {
      "patch": {
        "summary": "Atualizar sprint padrão",
        "operationId": "patchTemplateSprint",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sprint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 180
                  },
                  "duration_amount": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "duration_unit": {
                    "type": "string",
                    "enum": [
                      "weeks",
                      "days"
                    ]
                  },
                  "goal": {
                    "type": "string"
                  },
                  "auto_start": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "sprint"
          }
        }
      },
      "delete": {
        "summary": "Remover sprint padrão",
        "operationId": "deleteTemplateSprint",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sprint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removida"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/cards/": {
      "post": {
        "summary": "Adicionar card padrão ao modelo",
        "operationId": "createTemplateCard",
        "tags": [
          "Templates"
        ],
        "description": "Exige escopo write e papel owner/admin de workspace admin (mesma regra de Configurações → Modelos).",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 180
                  },
                  "description": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 6
                  },
                  "card_type": {
                    "type": "string",
                    "enum": [
                      "task",
                      "epic"
                    ]
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "every_sprint",
                      "specific_sprint"
                    ]
                  },
                  "template_sprint_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Obrigatório quando scope=specific_sprint"
                  },
                  "target_column_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "template_epic_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Só para task: card épico do mesmo modelo"
                  },
                  "checklist_items": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "maxLength": 200
                    }
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "card"
          }
        }
      }
    },
    "/api/v1/projects/templates/{template_id}/cards/{card_id}/": {
      "patch": {
        "summary": "Atualizar card padrão",
        "operationId": "patchTemplateCard",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 180
                  },
                  "description": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 6
                  },
                  "card_type": {
                    "type": "string",
                    "enum": [
                      "task",
                      "epic"
                    ]
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "every_sprint",
                      "specific_sprint"
                    ]
                  },
                  "template_sprint_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Obrigatório quando scope=specific_sprint"
                  },
                  "target_column_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "template_epic_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Só para task: card épico do mesmo modelo"
                  },
                  "checklist_items": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "maxLength": 200
                    }
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "card"
          }
        }
      },
      "delete": {
        "summary": "Remover card padrão",
        "operationId": "deleteTemplateCard",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removido"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/board-state/": {
      "get": {
        "summary": "Andamento estruturado (sprint ativa + backlog + demandas)",
        "operationId": "getBoardState",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Board state"
          },
          "403": {
            "description": "Sem permissão"
          },
          "404": {
            "description": "Board inexistente"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/columns/": {
      "get": {
        "summary": "Listar todas as colunas (incluindo vazias)",
        "operationId": "listColumns",
        "tags": [
          "Columns"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Colunas com cards_count"
          }
        }
      },
      "post": {
        "summary": "Criar coluna no quadro do projeto (entra no fim)",
        "operationId": "createColumn",
        "tags": [
          "Columns"
        ],
        "description": "Exige escopo write, admin do projeto e role kanban.manage (mesma regra da tela do Kanban). Vale para o quadro existente; não altera o modelo.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "color": {
                    "type": "string",
                    "description": "Hex #RRGGBB"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "column"
          },
          "400": {
            "description": "Nome ausente"
          },
          "403": {
            "description": "Sem escopo write, admin do projeto ou kanban.manage"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/columns/reorder/": {
      "post": {
        "summary": "Reordenar colunas (lista completa de ids)",
        "operationId": "reorderColumns",
        "tags": [
          "Columns"
        ],
        "description": "Exige escopo write, admin do projeto e role kanban.manage (mesma regra da tela do Kanban). Vale para o quadro existente; não altera o modelo.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "column_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "column_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "columns na nova ordem"
          },
          "400": {
            "description": "Lista incompleta ou com ids de outro quadro"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/columns/{column_id}/": {
      "patch": {
        "summary": "Renomear/recolorir coluna",
        "operationId": "patchColumn",
        "tags": [
          "Columns"
        ],
        "description": "Exige escopo write, admin do projeto e role kanban.manage (mesma regra da tela do Kanban). Vale para o quadro existente; não altera o modelo.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "color": {
                    "type": "string",
                    "description": "Hex #RRGGBB"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "column"
          }
        }
      },
      "delete": {
        "summary": "Remover coluna (cards vão para a primeira coluna restante)",
        "operationId": "deleteColumn",
        "tags": [
          "Columns"
        ],
        "description": "Exige escopo write, admin do projeto e role kanban.manage (mesma regra da tela do Kanban). Vale para o quadro existente; não altera o modelo. Gera snapshot antes de mover os cards. O quadro precisa manter ao menos uma coluna.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "column_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removida"
          },
          "400": {
            "description": "Última coluna do quadro"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/members/": {
      "get": {
        "summary": "Listar membros do projeto (user.id para assignee_ids)",
        "operationId": "listProjectMembers",
        "tags": [
          "Members"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "members[].user.id: use em PATCH card assignee_ids"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/labels/": {
      "get": {
        "summary": "Listar etiquetas (labels) do projeto",
        "operationId": "listProjectLabels",
        "tags": [
          "Labels"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "labels[].id: use em PATCH card label_ids"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/demands/{demand_id}/": {
      "get": {
        "summary": "Detalhe da demanda",
        "operationId": "getDemand",
        "tags": [
          "Demands"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "demand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Demanda"
          }
        }
      },
      "patch": {
        "summary": "Atualizar demanda aberta (title, description, dates, status open|closed)",
        "operationId": "updateDemand",
        "tags": [
          "Demands"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "demand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "closed"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Demanda atualizada"
          },
          "409": {
            "description": "Convertida ou encerrada"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/demands/{demand_id}/convert/": {
      "post": {
        "summary": "Converter demanda em card (idempotente)",
        "operationId": "convertDemand",
        "tags": [
          "Demands"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "demand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "column_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sprint_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Convertida"
          },
          "200": {
            "description": "Já convertida (idempotente)"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/": {
      "post": {
        "summary": "Criar card",
        "operationId": "createCard",
        "tags": [
          "Cards"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "column_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sprint_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "card_type": {
                    "type": "string",
                    "enum": [
                      "task",
                      "epic"
                    ]
                  },
                  "epic_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "UUID de um card épico do mesmo board. Só para card_type=task."
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 6
                  },
                  "is_blocked": {
                    "type": "boolean"
                  },
                  "assignee_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "label_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Card criado"
          },
          "403": {
            "description": "Sem escrita"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/bulk/": {
      "post": {
        "summary": "Operações em lote (dry_run + um snapshot)",
        "operationId": "bulkCards",
        "tags": [
          "Cards"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "operations"
                ],
                "properties": {
                  "dry_run": {
                    "type": "boolean",
                    "default": false
                  },
                  "operations": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "required": [
                        "action"
                      ],
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "move_card",
                            "move_sprint",
                            "update_card",
                            "create_card",
                            "delete_card",
                            "convert_demand",
                            "add_comment",
                            "update_comment",
                            "delete_comment"
                          ]
                        },
                        "card_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "column_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "demand_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "order": {
                          "type": "integer"
                        },
                        "title": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lote validado ou aplicado"
          },
          "400": {
            "description": "Validação falhou (errors[])"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/": {
      "get": {
        "summary": "Detalhe do card",
        "operationId": "getCard",
        "tags": [
          "Cards"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Card"
          }
        }
      },
      "patch": {
        "summary": "Atualizar card",
        "operationId": "updateCard",
        "tags": [
          "Cards"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Campos opcionais (envie só o que muda). Ao mover para coluna Concluído/Done preenche completed_at; ao sair de Bloqueio limpa is_blocked (salvo se is_blocked for enviado explicitamente).",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 6
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "is_archived": {
                    "type": "boolean"
                  },
                  "is_blocked": {
                    "type": "boolean"
                  },
                  "card_type": {
                    "type": "string",
                    "enum": [
                      "task",
                      "epic"
                    ]
                  },
                  "epic_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "UUID de um card do mesmo board com card_type=epic. null ou omitido com string vazia remove o vínculo. Não aplicável a cards do tipo épico."
                  },
                  "sprint_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "sprint": {
                    "type": "string",
                    "enum": [
                      "active",
                      "backlog"
                    ]
                  },
                  "column_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "order": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "assignee_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "label_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Card atualizado"
          }
        }
      },
      "delete": {
        "summary": "Excluir card (soft delete)",
        "operationId": "deleteCard",
        "tags": [
          "Cards"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Card excluído"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/move-sprint/": {
      "post": {
        "summary": "Mover card para sprint ativa ou backlog",
        "operationId": "moveCardSprint",
        "tags": [
          "Cards"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "enum": [
                      "active",
                      "backlog"
                    ],
                    "default": "active",
                    "description": "Alias: sprint ativa do projeto ou backlog."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Card movido (ou already on target)"
          },
          "400": {
            "description": "Sem sprint ativa / target inválido"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/comments/": {
      "get": {
        "summary": "Listar comentários do card",
        "operationId": "listCardComments",
        "tags": [
          "Comments"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de comentários"
          }
        }
      },
      "post": {
        "summary": "Criar comentário no card",
        "operationId": "createCardComment",
        "tags": [
          "Comments"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "mentioned_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Comentário criado"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/comments/{comment_id}/": {
      "patch": {
        "summary": "Editar comentário (autor ou kanban.manage)",
        "operationId": "updateCardComment",
        "tags": [
          "Comments"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "mentioned_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Comentário atualizado"
          }
        }
      },
      "delete": {
        "summary": "Remover comentário (soft delete)",
        "operationId": "deleteCardComment",
        "tags": [
          "Comments"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comentário removido"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/checklists/": {
      "get": {
        "summary": "Listar checklists do card",
        "operationId": "listCardChecklists",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de checklists com itens"
          }
        }
      },
      "post": {
        "summary": "Criar checklist (opcionalmente com itens)",
        "operationId": "createCardChecklist",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "description": "Títulos dos itens iniciais"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Checklist criada"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/checklists/{checklist_id}/": {
      "patch": {
        "summary": "Renomear checklist",
        "operationId": "updateCardChecklist",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "checklist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checklist atualizada"
          }
        }
      },
      "delete": {
        "summary": "Remover checklist (soft delete)",
        "operationId": "deleteCardChecklist",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "checklist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Checklist removida"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/checklists/{checklist_id}/items/": {
      "get": {
        "summary": "Listar itens da checklist",
        "operationId": "listChecklistItems",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "checklist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Itens"
          }
        }
      },
      "post": {
        "summary": "Adicionar item à checklist",
        "operationId": "createChecklistItem",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "checklist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Item criado"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/cards/{card_id}/checklists/{checklist_id}/items/{item_id}/": {
      "patch": {
        "summary": "Atualizar item (title e/ou is_done)",
        "operationId": "updateChecklistItem",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "checklist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "is_done": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Item atualizado"
          }
        }
      },
      "delete": {
        "summary": "Remover item (soft delete)",
        "operationId": "deleteChecklistItem",
        "tags": [
          "Checklists"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "checklist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Item removido"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/snapshots/": {
      "get": {
        "summary": "Listar snapshots válidos (< 5 dias)",
        "operationId": "listSnapshots",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de snapshots"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/snapshots/{snapshot_id}/": {
      "get": {
        "summary": "Detalhe do snapshot (meta + payload)",
        "operationId": "getSnapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "snapshot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/snapshots/{snapshot_id}/diff/": {
      "get": {
        "summary": "Diff do snapshot vs estado atual",
        "operationId": "diffSnapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "snapshot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Diff"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/snapshots/{snapshot_id}/restore/": {
      "post": {
        "summary": "Restaurar painel a partir do snapshot",
        "operationId": "restoreSnapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "snapshot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Painel restaurado"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/sprints/": {
      "get": {
        "summary": "Listar sprints do projeto (incl. backlog)",
        "operationId": "listSprints",
        "tags": [
          "Sprints"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sprints + sprint_policy"
          }
        }
      },
      "post": {
        "summary": "Criar sprint",
        "operationId": "createSprint",
        "tags": [
          "Sprints"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "start_date"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "duration_amount": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "duration_unit": {
                    "type": "string",
                    "enum": [
                      "weeks",
                      "days"
                    ]
                  },
                  "auto_start": {
                    "type": "boolean"
                  },
                  "goal": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Sprint criada"
          },
          "400": {
            "description": "Validação"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/sprints/{sprint_id}/activate/": {
      "post": {
        "summary": "Ativar sprint planejada",
        "operationId": "activateSprint",
        "tags": [
          "Sprints"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sprint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sprint ativada"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/sprints/{sprint_id}/close/": {
      "post": {
        "summary": "Encerrar sprint (avança sequência / gera automática)",
        "operationId": "closeSprint",
        "tags": [
          "Sprints"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sprint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sprint encerrada; next_sprint se política avançar"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/planning/": {
      "get": {
        "summary": "Planejamento (Gantt, estimativa de sprints, escopo)",
        "operationId": "getPlanning",
        "tags": [
          "Planning"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contexto de planejamento"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/automations/": {
      "get": {
        "summary": "Listar regras e presets de automação",
        "operationId": "listAutomations",
        "tags": [
          "Automations"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "rules + presets"
          }
        }
      },
      "post": {
        "summary": "Criar regra de automação (exige kanban.manage + admin)",
        "operationId": "createAutomation",
        "tags": [
          "Automations"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "column_id",
                  "preset_slug"
                ],
                "properties": {
                  "column_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "preset_slug": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object",
                    "description": "business_days, label_names, target_column_name, notification_*, match_checklist_title"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Regra criada"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/automations/{rule_id}/": {
      "patch": {
        "summary": "Ativar/desativar regra",
        "operationId": "patchAutomation",
        "tags": [
          "Automations"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "is_enabled"
                ],
                "properties": {
                  "is_enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Regra atualizada"
          }
        }
      },
      "delete": {
        "summary": "Remover regra (soft delete)",
        "operationId": "deleteAutomation",
        "tags": [
          "Automations"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removida"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/documents/": {
      "get": {
        "summary": "Listar documentos do projeto",
        "operationId": "listDocuments",
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lista (sem body markdown)"
          }
        }
      },
      "post": {
        "summary": "Criar documento (sincroniza GED)",
        "operationId": "createDocument",
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "content_markdown": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Documento criado"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/documents/{doc_id}/": {
      "get": {
        "summary": "Ler documento (com content_markdown)",
        "operationId": "getDocument",
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Documento"
          }
        }
      },
      "patch": {
        "summary": "Atualizar título/conteúdo (sincroniza GED)",
        "operationId": "patchDocument",
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "content_markdown": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atualizado"
          }
        }
      },
      "delete": {
        "summary": "Enviar documento para lixeira",
        "operationId": "deleteDocument",
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Na lixeira"
          }
        }
      }
    }
  }
}