{"openapi":"3.0.0","info":{"title":"API - Sistema de Avaliacao de Projetos da Fabrica de Software","version":"1.0.0","description":"Documentacao oficial da API.\n\nFluxo sugerido para teste:\n1. Fazer login em /login\n2. Usar o token Bearer nas rotas protegidas\n3. Executar fluxos de usuario, admin, fabrica, template e artefatos"},"servers":[{"url":"https://api.exemplo.com"},{"url":"http://localhost:3000"}],"tags":[{"name":"Auth","description":"Autenticacao de usuarios"},{"name":"Usuarios","description":"Gestao de usuarios"},{"name":"Admin","description":"Operacoes administrativas"},{"name":"Fabricas","description":"Gestao de fabricas de software"},{"name":"Templates","description":"Templates de avaliacao"},{"name":"Artefatos","description":"Registro e consulta de avaliações dos artefatos que os alunos devem apresentar por milestone. Não há envio de arquivos pelo aluno — o professor registra a avaliação."},{"name":"Projetos","description":"Gestao de projetos"},{"name":"Milestones","description":"Gestao de milestones dos projetos"}],"paths":{"/login":{"post":{"tags":["Auth"],"summary":"Autenticar usuario","description":"Realiza login e retorna token com dados basicos do usuario.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/AuthLoginData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/logout":{"post":{"tags":["Auth"],"summary":"Encerrar sessao do usuario","description":"Revoga o token JWT atual para impedir reutilizacao posterior.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/AuthLogoutData"},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/usuarios":{"get":{"tags":["Usuarios"],"summary":"Listar usuarios","description":"Lista usuarios com paginacao e filtros.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"funcao","in":"query","schema":{"type":"string","enum":["ADMIN","PROFESSOR","ALUNO"]}},{"name":"busca","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/UsuariosListData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"post":{"tags":["Usuarios"],"summary":"Cadastro proprio de usuario","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsuarioCadastroBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Created"},"data":{"$ref":"#/components/schemas/AdminUsuarioData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Conflict"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Conflict"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/usuarios/{id}":{"get":{"tags":["Usuarios"],"summary":"Detalhar usuario por ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/AdminUsuarioData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"patch":{"tags":["Usuarios"],"summary":"Atualizar perfil de usuario","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsuarioAtualizarBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/AdminUsuarioData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/usuarios/{id}/notas":{"get":{"tags":["Usuarios"],"summary":"Listar notas do usuario","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"projeto_id","in":"query","schema":{"type":"string"}},{"name":"semestre","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/admin/usuarios":{"post":{"tags":["Admin"],"summary":"Cadastrar usuario como administrador","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCadastroBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Created"},"data":{"$ref":"#/components/schemas/AdminUsuarioData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Conflict"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Conflict"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/admin/usuarios/{id}/aceitar-cadastro":{"post":{"tags":["Admin"],"summary":"Aceitar cadastro de usuario pendente","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/AdminUsuarioData"},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/admin/usuarios/{id}/recusar-cadastro":{"post":{"tags":["Admin"],"summary":"Recusar cadastro de usuario pendente","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRecusarBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/AdminUsuarioData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/fabricas":{"get":{"tags":["Fabricas"],"summary":"Listar fábricas (turmas/períodos)","description":"Lista fábricas que representam turmas/períodos. Cada fábrica identifica um semestre/periodo (campo `semestre`).","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"post":{"tags":["Fabricas"],"summary":"Criar fábrica (PROFESSOR/ADMIN)","description":"Cria uma nova fábrica que representa uma turma/período. A criação é permitida apenas para usuários com papel PROFESSOR ou ADMIN. Use autenticação Bearer (token).","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FabricaCriarBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Created"},"data":{"$ref":"#/components/schemas/FabricaDataWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/fabricas/{id}":{"get":{"tags":["Fabricas"],"summary":"Detalhar fabrica por ID","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/FabricaResponse"},"errors":{"type":"array","example":[]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"put":{"tags":["Fabricas"],"summary":"Atualizar fábrica por ID (PROFESSOR/ADMIN)","description":"Atualiza dados da fábrica. Apenas usuários com papel PROFESSOR ou ADMIN podem editar.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FabricaAtualizarBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/FabricaDataWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"delete":{"tags":["Fabricas"],"summary":"Excluir fábrica por ID (ADMIN)","description":"Exclusão de fábrica. Requer papel ADMIN.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/templates-avaliacao":{"get":{"tags":["Templates"],"summary":"Listar templates de avaliação","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/templates-avaliacao/fabrica/{id_fabrica}":{"get":{"tags":["Templates"],"summary":"Listar templates por fábrica","description":"Lista templates associados a uma fábrica específica.","parameters":[{"name":"id_fabrica","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"post":{"tags":["Templates"],"summary":"Criar template para fábrica (PROFESSOR/ADMIN)","description":"Cria um template vinculado a uma fabrica. A criacao e permitida apenas para usuarios com papel PROFESSOR ou ADMIN. O body deve conter milestones com artefatos esperados, com nome, descricao, tipo, peso e regras claras de avaliacao.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id_fabrica","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCriarBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Created"},"data":{"$ref":"#/components/schemas/TemplateDataWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/templates-avaliacao/{id}":{"get":{"tags":["Templates"],"summary":"Detalhar template por ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/TemplateResponse"},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"put":{"tags":["Templates"],"summary":"Atualizar template por ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAtualizarBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/TemplateDataWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"delete":{"tags":["Templates"],"summary":"Excluir template por ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/projetos/{id_projeto}/milestones/{id_milestone}/artefatos":{"get":{"tags":["Artefatos"],"summary":"Listar avaliações de artefatos da milestone","description":"Retorna as avaliações dos artefatos que os alunos precisam apresentar nesta milestone. Cada registro representa a nota e o status de avaliação de um artefato esperado. Não há envio de arquivos pelo aluno — o professor registra a avaliação.","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}},{"name":"id_milestone","in":"path","required":true,"schema":{"type":"string"}},{"name":"tipo","in":"query","schema":{"type":"string"}},{"name":"id_aluno","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/ArtefatoListData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"post":{"tags":["Artefatos"],"summary":"Registrar nota e feedback de artefato para aluno na milestone (admin/professor)","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}},{"name":"id_milestone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtefatoRegistrarNotaBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Created"},"data":{"$ref":"#/components/schemas/ArtefatoRegistroNotaData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/projetos/{id_projeto}/milestones/{id_milestone}/artefatos/{id_artefato}":{"patch":{"tags":["Artefatos"],"summary":"Editar avaliação de artefato","description":"Rota exclusiva para o professor ou admin editar uma avaliação e alterar a nota ou feedback previamente registrado.","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}},{"name":"id_milestone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id_artefato","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtefatoEditarAvaliacaoBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/ArtefatoAvaliacaoEditadaData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Conflict"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Conflict"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/api/projetos":{"get":{"tags":["Projetos"],"summary":"Listar projetos","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["PLANEJADO","EM_ANDAMENTO","CONCLUIDO","ARQUIVADO"]}},{"name":"id_fabrica","in":"query","schema":{"type":"string"}},{"name":"id_responsavel","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/ProjetoListData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"post":{"tags":["Projetos"],"summary":"Criar projeto","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjetoCriarBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Created"},"data":{"$ref":"#/components/schemas/ProjetoWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/api/projetos/{id}":{"get":{"tags":["Projetos"],"summary":"Detalhar projeto","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/ProjetoResponse"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"patch":{"tags":["Projetos"],"summary":"Atualizar projeto","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjetoAtualizarBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/ProjetoWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"delete":{"tags":["Projetos"],"summary":"Excluir projeto","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/api/projetos/{id_projeto}/milestones":{"get":{"tags":["Milestones"],"summary":"Listar milestones do projeto","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["PENDENTE","ABERTA","EM_AVALIACAO","CONCLUIDA","ENCERRADA"]}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/MilestoneListData"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"post":{"tags":["Milestones"],"summary":"Criar milestone no projeto","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneCriarBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Created"},"data":{"$ref":"#/components/schemas/MilestoneWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}},"/api/projetos/{id_projeto}/milestones/{id_milestone}":{"get":{"tags":["Milestones"],"summary":"Detalhar milestone","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}},{"name":"id_milestone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/MilestoneResponse"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"patch":{"tags":["Milestones"],"summary":"Atualizar milestone","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}},{"name":"id_milestone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneAtualizarBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"$ref":"#/components/schemas/MilestoneWrapper"},"errors":{"type":"array","example":[]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Bad Request"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Bad Request"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}},"delete":{"tags":["Milestones"],"summary":"Excluir milestone","parameters":[{"name":"id_projeto","in":"path","required":true,"schema":{"type":"string"}},{"name":"id_milestone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Unauthorized"}]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Forbidden"}]}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not Found"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Not Found"}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal Server Error"},"data":{"type":"array","items":{},"example":[]},"errors":{"type":"array","example":[{"message":"Internal Server Error"}]}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"LoginBody":{"type":"object","properties":{"email":{"type":"string","minLength":1,"format":"email"},"senha":{"type":"string","minLength":1}},"required":["email","senha"],"additionalProperties":false,"description":"Payload para autenticacao do usuario."},"AuthLogoutData":{"type":"object","properties":{"message":{"type":"string","example":"Logout realizado com sucesso."}}},"AuthLoginData":{"type":"object","properties":{"token":{"type":"string","description":"JWT de acesso"},"usuario":{"type":"object","properties":{"id":{"type":"string"},"nome":{"type":"string"},"email":{"type":"string","format":"email"},"funcao":{"type":"string","enum":["ADMIN","PROFESSOR","ALUNO"]}}}}},"UsuarioCadastroBody":{"type":"object","properties":{"nome":{"type":"string","minLength":3},"email":{"type":"string","minLength":1,"format":"email"},"senha":{"type":"string","minLength":8,"pattern":"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$"},"funcao":{"type":"string","minLength":1}},"required":["nome","email","senha","funcao"],"additionalProperties":false,"description":"Body para cadastro do proprio usuario."},"UsuarioListagemQuery":{"type":"object","properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"funcao":{"type":"string"},"busca":{"type":"string"}},"additionalProperties":false,"description":"Query para listagem de usuarios."},"UsuarioAtualizarBody":{"type":"object","properties":{"nome":{"type":"string","minLength":3},"avatar_url":{"type":"string","format":"uri"},"senha_atual":{"type":"string","minLength":1},"nova_senha":{"type":"string","minLength":8,"pattern":"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$"}},"additionalProperties":false,"description":"Body para atualizacao de perfil."},"UsuarioNotasQuery":{"type":"object","properties":{"projeto_id":{"type":"string"},"semestre":{"type":"string"}},"additionalProperties":false,"description":"Filtro para listagem de notas do usuario."},"UsuarioResponse":{"type":"object","properties":{"id":{"type":"string"},"nome":{"type":"string"},"email":{"type":"string","format":"email"},"funcao":{"type":"string","enum":["ADMIN","PROFESSOR","ALUNO"]},"avatar_url":{"type":"string","example":""},"status":{"type":"string"},"data_cadastro":{"type":"string","format":"date-time"}}},"UsuariosListData":{"type":"object","properties":{"usuarios":{"type":"array","items":{"$ref":"#/components/schemas/UsuarioResponse"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","example":1},"limit":{"type":"integer","example":10},"total":{"type":"integer","example":10},"totalPages":{"type":"integer","example":1}}}}},"AdminCadastroBody":{"type":"object","properties":{"nome":{"type":"string","minLength":3},"email":{"type":"string","minLength":1,"format":"email"},"senha":{"type":"string","minLength":8,"pattern":"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$"},"funcao":{"type":"string","minLength":1}},"required":["nome","email","senha","funcao"],"additionalProperties":false,"description":"Body para cadastro de usuario por admin."},"AdminRecusarBody":{"type":"object","properties":{"motivo_recusa":{"type":"string","minLength":1}},"additionalProperties":false,"description":"Body para recusar cadastro pendente."},"AdminUsuarioData":{"type":"object","properties":{"usuario":{"type":"object","properties":{"id":{"type":"string"},"nome":{"type":"string"},"email":{"type":"string"},"funcao":{"type":"string"},"status":{"type":"string"}}}}},"FabricaCriarBody":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"semestre":{"type":"string","minLength":1,"pattern":"^\\d{4}\\.\\d$"},"descricao":{"type":"string"},"ativa":{"type":"boolean"}},"required":["nome","semestre"],"additionalProperties":false,"description":"Body para criar fábrica. Criação permitida apenas para usuários com papel PROFESSOR ou ADMIN. O campo `semestre` representa o período/turma e deve seguir o formato YYYY.S (ex: 2026.1)."},"FabricaAtualizarBody":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"semestre":{"type":"string","minLength":1,"pattern":"^\\d{4}\\.\\d$"},"descricao":{"type":"string"},"ativa":{"type":"boolean"}},"additionalProperties":false,"description":"Body para atualizar fábrica. Apenas professores/admin podem editar. `semestre` deve seguir o formato YYYY.S (ex: 2026.1)."},"FabricaResponse":{"type":"object","properties":{"_id":{"type":"string"},"nome":{"type":"string"},"semestre":{"type":"string","example":"2026.1","description":"Semestre/período da turma (formato YYYY.S), identifica a turma desta fábrica."},"descricao":{"type":"string"},"ativa":{"type":"boolean"}}},"FabricaDataWrapper":{"type":"object","properties":{"fabrica":{"$ref":"#/components/schemas/FabricaResponse"}}},"TemplateCriarBody":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string"},"ativo":{"type":"boolean","default":true},"milestones":{"type":"array","items":{"type":"object","properties":{"codigo":{"type":"string","minLength":1},"titulo":{"type":"string","minLength":1},"descricao":{"type":"string"},"ordem":{"type":"number","minimum":1},"dias_prazo":{"type":"number","minimum":0,"default":0},"artefatos":{"type":"array","items":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string","minLength":1},"tipo":{"type":"string","enum":["REQUISITOS","DESIGN","CODIGO","OUTRO"],"default":"OUTRO"},"peso":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":100},"obrigatorio":{"type":"boolean","default":true}},"required":["nome","descricao","peso"],"additionalProperties":false},"minItems":1},"atributos":{"type":"array","items":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string"},"peso":{"type":"number","minimum":0,"maximum":100},"escala_min":{"type":"number","default":0},"escala_max":{"type":"number","default":10},"aplica_em":{"type":"string","enum":["AUTO","PEER","AMBOS"],"default":"AMBOS"}},"required":["nome","peso"],"additionalProperties":false},"default":[]}},"required":["codigo","titulo","ordem","artefatos"],"additionalProperties":false},"minItems":1}},"required":["nome","milestones"],"additionalProperties":false,"description":"Body para criar template de avaliacao. A criacao e permitida apenas para usuarios com papel PROFESSOR ou ADMIN, vinculada a uma fabrica via id_fabrica (path param). O template deve conter milestones com artefatos esperados e soma de pesos em 100% por milestone."},"TemplateAtualizarBody":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string"},"ativo":{"type":"boolean","default":true},"milestones":{"type":"array","items":{"type":"object","properties":{"codigo":{"type":"string","minLength":1},"titulo":{"type":"string","minLength":1},"descricao":{"type":"string"},"ordem":{"type":"number","minimum":1},"dias_prazo":{"type":"number","minimum":0,"default":0},"artefatos":{"type":"array","items":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string","minLength":1},"tipo":{"type":"string","enum":["REQUISITOS","DESIGN","CODIGO","OUTRO"],"default":"OUTRO"},"peso":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":100},"obrigatorio":{"type":"boolean","default":true}},"required":["nome","descricao","peso"],"additionalProperties":false},"minItems":1},"atributos":{"type":"array","items":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string"},"peso":{"type":"number","minimum":0,"maximum":100},"escala_min":{"type":"number","default":0},"escala_max":{"type":"number","default":10},"aplica_em":{"type":"string","enum":["AUTO","PEER","AMBOS"],"default":"AMBOS"}},"required":["nome","peso"],"additionalProperties":false},"default":[]}},"required":["codigo","titulo","ordem","artefatos"],"additionalProperties":false},"minItems":1}},"additionalProperties":false,"description":"Body para atualizar template de avaliacao. O template continua vinculado a fabrica de origem."},"TemplateArtefatoEsperado":{"type":"object","required":["nome","descricao","tipo","peso"],"properties":{"nome":{"type":"string","example":"PM Canvas"},"descricao":{"type":"string","example":"Canvas de planejamento do projeto"},"tipo":{"type":"string","enum":["REQUISITOS","DESIGN","CODIGO","OUTRO"],"example":"REQUISITOS"},"peso":{"type":"number","minimum":0.01,"maximum":100,"example":40},"obrigatorio":{"type":"boolean","example":true}}},"TemplateMilestone":{"type":"object","required":["codigo","titulo","ordem","artefatos"],"properties":{"codigo":{"type":"string","example":"M1"},"titulo":{"type":"string","example":"Milestone 1"},"descricao":{"type":"string","example":"Primeira etapa avaliada"},"ordem":{"type":"number","example":1},"dias_prazo":{"type":"number","example":30},"artefatos":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/TemplateArtefatoEsperado"}},"atributos":{"type":"array","items":{"type":"object"}}}},"TemplateResponse":{"type":"object","properties":{"_id":{"type":"string"},"id_fabrica":{"type":"string"},"nome":{"type":"string"},"descricao":{"type":"string"},"ativo":{"type":"boolean"},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/TemplateMilestone"}}}},"TemplateDataWrapper":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/TemplateResponse"}}},"ArtefatoRegistrarNotaBody":{"type":"object","properties":{"id_aluno":{"type":"string","minLength":1},"titulo":{"type":"string","minLength":1,"maxLength":255},"tipo":{"type":"string","enum":["REQUISITOS","DESIGN","CODIGO","TESTE","DOCUMENTACAO","OUTRO"]},"nota_atribuida":{"type":"number","minimum":0,"maximum":10},"peso_aplicado":{"type":"number","minimum":0,"maximum":100},"feedback":{"type":"string","maxLength":2000},"versao":{"type":"integer","minimum":1}},"required":["id_aluno","tipo","nota_atribuida"],"additionalProperties":false,"description":"Body para registro de nota/feedback para aluno em milestone."},"ArtefatoListarQuery":{"type":"object","properties":{"status_validacao":{"type":"string","enum":["PENDENTE","APROVADO","REPROVADO"]},"tipo":{"type":"string","enum":["REQUISITOS","DESIGN","CODIGO","TESTE","DOCUMENTACAO","OUTRO"]},"id_autor":{"type":"string","minLength":1},"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false,"description":"Filtros opcionais para listagem de artefatos."},"ArtefatoEditarAvaliacaoBody":{"type":"object","properties":{"status_validacao":{"type":"string","enum":["APROVADO","REPROVADO"]},"nota_atribuida":{"type":"number","minimum":0,"maximum":10},"peso_aplicado":{"type":"number","minimum":0,"maximum":100},"comentario":{"type":"string"}},"required":["status_validacao"],"additionalProperties":false,"description":"Estrutura para o professor editar a avaliação e nota do artefato."},"ArtefatoResponse":{"type":"object","properties":{"id":{"type":"string"},"tipo":{"type":"string","description":"Categoria do artefato que o aluno deve apresentar (ex: REQUISITOS, DESIGN, CODIGO, TESTE, DOCUMENTACAO, OUTRO)."},"id_aluno":{"type":"string","description":"ID do aluno avaliado."},"avaliado_por":{"type":"string","description":"ID do professor/admin que avaliou."},"nota_atribuida":{"type":"number","nullable":true,"description":"Nota atribuída ao artefato (0-10)."},"peso_aplicado":{"type":"number","description":"Peso do artefato na milestone (0-100)."},"nota_ponderada":{"type":"number","nullable":true,"description":"Nota ponderada (nota * peso / 100)."},"feedback":{"type":"string","description":"Feedback/comentários sobre a avaliação."},"data_registro":{"type":"string","format":"date-time","description":"Data em que a avaliação do artefato foi registrada."},"data_atualizacao":{"type":"string","format":"date-time","description":"Data em que a avaliação foi atualizada pela última vez."}}},"ArtefatoRegistroNotaData":{"type":"object","properties":{"artefato":{"$ref":"#/components/schemas/ArtefatoResponse"}}},"ArtefatoListData":{"type":"object","properties":{"artefatos":{"type":"array","items":{"$ref":"#/components/schemas/ArtefatoResponse"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","example":1},"limit":{"type":"integer","example":10},"total":{"type":"integer","example":1},"totalPages":{"type":"integer","example":1}}}}},"ArtefatoAvaliacaoEditadaData":{"type":"object","properties":{"artefato":{"type":"object","properties":{"id":{"type":"string"},"nota_atribuida":{"type":"number"},"peso_aplicado":{"type":"number"},"nota_ponderada":{"type":"number"},"avaliado_por":{"type":"string"},"feedback":{"type":"string","description":"Feedback do professor sobre a apresentação externa do artefato."},"data_atualizacao":{"type":"string","format":"date-time"}}}}},"ProjetoCriarBody":{"type":"object","properties":{"titulo":{"type":"string","minLength":1},"descricao":{"type":"string"},"id_fabrica":{"type":"string","minLength":1},"id_responsavel":{"type":"string","minLength":1},"membros":{"type":"array","items":{"type":"object","properties":{"id_usuario":{"type":"string","minLength":1},"cargo":{"type":"string","minLength":1},"lider":{"type":"boolean","default":false},"ativo":{"type":"boolean","default":true}},"required":["id_usuario","cargo"],"additionalProperties":false},"minItems":1},"semestre":{"type":"string","pattern":"^\\d{4}\\.\\d$"},"status":{"type":"string","enum":["PLANEJADO","EM_ANDAMENTO","CONCLUIDO","ARQUIVADO"],"default":"EM_ANDAMENTO"},"data_conclusao_prevista":{"type":"string","format":"date-time"}},"required":["titulo","id_fabrica","id_responsavel","membros"],"additionalProperties":false,"description":"Body para criar projeto."},"ProjetoAtualizarBody":{"type":"object","properties":{"titulo":{"type":"string","minLength":1},"descricao":{"type":"string"},"id_fabrica":{"type":"string","minLength":1},"id_responsavel":{"type":"string","minLength":1},"membros":{"type":"array","items":{"type":"object","properties":{"id_usuario":{"type":"string","minLength":1},"cargo":{"type":"string","minLength":1},"lider":{"type":"boolean","default":false},"ativo":{"type":"boolean","default":true}},"required":["id_usuario","cargo"],"additionalProperties":false},"minItems":1},"semestre":{"type":"string","pattern":"^\\d{4}\\.\\d$"},"status":{"type":"string","enum":["PLANEJADO","EM_ANDAMENTO","CONCLUIDO","ARQUIVADO"],"default":"EM_ANDAMENTO"},"data_conclusao_prevista":{"type":"string","format":"date-time"}},"additionalProperties":false,"description":"Body para atualizar projeto."},"ProjetoListarQuery":{"type":"object","properties":{"status":{"type":"string","enum":["PLANEJADO","EM_ANDAMENTO","CONCLUIDO","ARQUIVADO"]},"id_fabrica":{"type":"string","minLength":1},"id_responsavel":{"type":"string","minLength":1},"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false,"description":"Query para listar projetos."},"ProjetoBuscarParams":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false,"description":"Params para buscar projeto."},"ProjetoResponse":{"type":"object","properties":{"_id":{"type":"string"},"id_fabrica":{"type":"string"},"titulo":{"type":"string"},"descricao":{"type":"string"},"id_responsavel":{"type":"string"},"membros":{"type":"array","items":{"type":"object","properties":{"id_usuario":{"type":"string"},"cargo":{"type":"string"},"lider":{"type":"boolean"},"ativo":{"type":"boolean"}}}},"status":{"type":"string","enum":["PLANEJADO","EM_ANDAMENTO","CONCLUIDO","ARQUIVADO"]},"data_inicio":{"type":"string","format":"date-time"},"data_conclusao_prevista":{"type":"string","format":"date-time","nullable":true},"data_conclusao_real":{"type":"string","format":"date-time","nullable":true},"semestre":{"type":"string"},"data_criacao":{"type":"string","format":"date-time"},"data_atualizacao":{"type":"string","format":"date-time"}}},"ProjetoWrapper":{"type":"object","properties":{"projeto":{"$ref":"#/components/schemas/ProjetoResponse"}}},"ProjetoListData":{"type":"object","properties":{"docs":{"type":"array","items":{"$ref":"#/components/schemas/ProjetoResponse"}},"totalDocs":{"type":"integer","example":1},"limit":{"type":"integer","example":10},"totalPages":{"type":"integer","example":1},"page":{"type":"integer","example":1},"hasPrevPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":false}}},"MilestoneCriarBody":{"type":"object","properties":{"codigo":{"type":"string","minLength":1},"titulo":{"type":"string","minLength":1},"descricao":{"type":"string"},"data_prazo":{"type":"string","format":"date-time"},"id_template":{"type":"string"},"atributos_avaliacao":{"type":"array","items":{"type":"object","properties":{"id_atributo":{"type":"string","minLength":1},"peso":{"type":"number","minimum":0,"maximum":100},"obrigatorio":{"type":"boolean","default":true}},"required":["id_atributo","peso"],"additionalProperties":false},"default":[]},"artefatos_esperados":{"type":"array","items":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string"},"tipo":{"type":"string","default":"OUTRO"},"peso":{"type":"number","minimum":0,"maximum":100},"obrigatorio":{"type":"boolean","default":true}},"required":["nome","peso"],"additionalProperties":false},"default":[]},"status":{"type":"string","enum":["PENDENTE","ABERTA","EM_AVALIACAO","CONCLUIDA","ENCERRADA"],"default":"PENDENTE"}},"required":["codigo","titulo","data_prazo"],"additionalProperties":false,"description":"Body para criar milestone. `data_prazo` aceita ISO 8601 (recomendado) ou formato dd/MM/yyyy HH:mm; o backend normaliza o horário para 23:59:59.999 UTC do mesmo dia e armazena em ISO 8601."},"MilestoneAtualizarBody":{"type":"object","properties":{"codigo":{"type":"string","minLength":1},"titulo":{"type":"string","minLength":1},"descricao":{"type":"string"},"data_prazo":{"type":"string","format":"date-time"},"id_template":{"type":"string"},"atributos_avaliacao":{"type":"array","items":{"type":"object","properties":{"id_atributo":{"type":"string","minLength":1},"peso":{"type":"number","minimum":0,"maximum":100},"obrigatorio":{"type":"boolean","default":true}},"required":["id_atributo","peso"],"additionalProperties":false},"default":[]},"artefatos_esperados":{"type":"array","items":{"type":"object","properties":{"nome":{"type":"string","minLength":1},"descricao":{"type":"string"},"tipo":{"type":"string","default":"OUTRO"},"peso":{"type":"number","minimum":0,"maximum":100},"obrigatorio":{"type":"boolean","default":true}},"required":["nome","peso"],"additionalProperties":false},"default":[]},"status":{"type":"string","enum":["PENDENTE","ABERTA","EM_AVALIACAO","CONCLUIDA","ENCERRADA"],"default":"PENDENTE"}},"additionalProperties":false,"description":"Body para atualizar milestone. `data_prazo` aceita ISO 8601 ou dd/MM/yyyy HH:mm; o backend normaliza o horário para 23:59:59.999 UTC do mesmo dia e armazena em ISO 8601."},"MilestoneListarQuery":{"type":"object","properties":{"status":{"type":"string","enum":["PENDENTE","ABERTA","EM_AVALIACAO","CONCLUIDA","ENCERRADA"]},"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false,"description":"Query para listar milestones."},"MilestoneBuscarParams":{"type":"object","properties":{"id_projeto":{"type":"string","minLength":1},"id_milestone":{"type":"string","minLength":1}},"required":["id_projeto","id_milestone"],"additionalProperties":false,"description":"Params para buscar milestone."},"MilestoneResponse":{"type":"object","properties":{"_id":{"type":"string"},"id_projeto":{"type":"string"},"id_template":{"type":"string","nullable":true},"codigo":{"type":"string"},"titulo":{"type":"string"},"descricao":{"type":"string"},"status":{"type":"string","enum":["PENDENTE","ABERTA","EM_AVALIACAO","CONCLUIDA","ENCERRADA"]},"data_abertura":{"type":"string","format":"date-time","nullable":true},"data_prazo":{"type":"string","format":"date-time","description":"Prazo da milestone. Aceita ISO 8601 (ex: 2026-05-30T23:59:59.000Z) ou dd/MM/yyyy HH:mm (ex: 30/05/2026 23:59). O backend normaliza o horário para 23:59:59.999 UTC do mesmo dia e armazena em ISO 8601.","example":"2026-05-30T23:59:59.999Z"},"data_encerramento":{"type":"string","format":"date-time","nullable":true},"atributos_avaliacao":{"type":"array","items":{"type":"object","properties":{"id_atributo":{"type":"string"},"peso":{"type":"number"},"obrigatorio":{"type":"boolean"}}}},"artefatos_esperados":{"type":"array","items":{"type":"object","properties":{"nome":{"type":"string"},"descricao":{"type":"string"},"tipo":{"type":"string"},"peso":{"type":"number"},"obrigatorio":{"type":"boolean"}}}},"data_criacao":{"type":"string","format":"date-time"}}},"MilestoneWrapper":{"type":"object","properties":{"milestone":{"$ref":"#/components/schemas/MilestoneResponse"}}},"MilestoneListData":{"type":"object","properties":{"docs":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneResponse"}},"totalDocs":{"type":"integer","example":1},"limit":{"type":"integer","example":10},"totalPages":{"type":"integer","example":1},"page":{"type":"integer","example":1},"hasPrevPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":false}}}}},"security":[{"bearerAuth":[]}]}