{ "openapi": "3.0.3", "info": { "title": "ADV CM Filler API", "version": "1.3.0", "description": "Preenche o Anexo 01 POP-NO-GQ-165 e devolve um link público para download do DOCX." }, "servers": [ { "url": "https://adv-cm-api-1-vswc.onrender.com" } ], "paths": { "/health": { "get": { "operationId": "health", "summary": "Healthcheck", "responses": { "200": { "description": "OK" } } } }, "/fill_url": { "post": { "operationId": "preencherCMUrl", "summary": "Gera o DOCX e retorna URL pública para download", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CMPayload" } } } }, "responses": { "200": { "description": "URL do arquivo gerado", "content": { "application/json": { "schema": { "type": "object", "properties": { "filename": { "type": "string" }, "fileUrl": { "type": "string", "format": "uri" } }, "required": ["filename", "fileUrl"] } } } }, "401": { "description": "API key inválida" }, "500": { "description": "Erro interno" } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "x-api-key" } }, "schemas": { "CMPayload": { "type": "object", "required": [ "data", "solicitante", "departamento", "situacao_atual", "alteracao_proposta", "abrangencia", "classificacao", "justificativa_classificacao" ], "properties": { "numero_cm": { "type": "string", "description": "Se informado, será impresso no cabeçalho (célula 'CM')." }, "data": { "type": "string" }, "solicitante": { "type": "string" }, "departamento": { "type": "string" }, "situacao_atual": { "type": "string" }, "alteracao_proposta": { "type": "string" }, "descricoes_itens": { "type": "array", "items": { "type": "string" } }, "numeros_correspondentes": { "type": "array", "items": { "type": "string" } }, "abrangencia": { "type": "string" }, "titulo_mudanca": { "type": "string" }, "caracter_mudanca": { "type": "string", "enum": ["Temporária","Definitiva"] }, "retorno_mudanca_temp": { "type": "string" }, "mudanca_refere_se": { "type": "array", "items": { "type": "string" } }, "impactos": { "type": "array", "items": { "type": "string" } }, "classificacao": { "type": "string", "enum": ["CRÍTICA","MAIOR","MENOR"] }, "justificativa_classificacao": { "type": "string" }, "justificativa_mudanca": { "type": "string" }, "anexos_aplicaveis": { "type": "array", "items": { "type": "string" } }, "departamentos_pertinentes": { "type": "array", "items": { "type": "string" } }, "treinamento_executado": { "type": "boolean" }, "plano_implementacao": { "type": "array", "items": { "type": "string" } }, "voe_criterios": { "type": "string" }, "voe_periodo": { "type": "string" }, "voe_resultados_esperados": { "type": "string" }, "observacoes_finais": { "type": "string" } } } } } }