openapi: 3.0.3 info: title: Acervo Filarmonica API description: API do sistema de gestão de partituras da Filarmonica 25 de Março version: 3.2.0 contact: name: Acervo Filarmonica servers: - url: http://localhost:8787 description: Desenvolvimento local - url: https://acervo-filarmonica-api.acssjr.workers.dev description: Produção tags: - name: Health description: Health check - name: Auth description: Autenticação e sessão - name: Partituras description: Gestão de partituras - name: Partes description: Gestão de partes de partituras - name: Categorias description: Gestão de categorias - name: Favoritos description: Favoritos do usuário - name: Atividades description: Log de atividades - name: Estatisticas description: Estatísticas do sistema - name: Usuarios description: Gestão de usuários (admin) - name: Perfil description: Perfil do usuário autenticado - name: Repertorio description: Gestão de repertórios components: securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: Error: type: object properties: error: type: string required: - error Success: type: object properties: success: type: boolean message: type: string AnalyticsInterval: type: object required: [inicio, fim] properties: inicio: { type: string, format: date } fim: { type: string, format: date } AnalyticsProjection: type: object required: [disponivel, valor, fator, confianca] properties: disponivel: { type: boolean } valor: { type: number, nullable: true } fator: { type: number, nullable: true } confianca: { type: string, enum: [alta, media, indisponivel] } AnalyticsPeriod: type: object required: [inicio, fim, fim_solicitado, dias_decorridos, dias_totais, incompleto, comparacao, projecao] properties: inicio: { type: string, format: date } fim: { type: string, format: date } fim_solicitado: { type: string, format: date } dias_decorridos: { type: integer, minimum: 0 } dias_totais: { type: integer, minimum: 1 } incompleto: { type: boolean } comparacao: { $ref: '#/components/schemas/AnalyticsInterval' } projecao: { $ref: '#/components/schemas/AnalyticsProjection' } EngagementSummary: type: object properties: total_acoes: { type: number } visualizacoes: { type: integer } downloads: { type: integer } buscas: { type: integer } favoritos: { type: integer } repertorios: { type: integer } usuarios_com_acao: { type: integer } usuarios_elegiveis: { type: integer } variacao_acoes: { type: integer, nullable: true } SheetSummary: type: object properties: visualizacoes: { type: integer } downloads: { type: integer } acessos_pdf: { type: integer } usuarios: { type: integer } partituras_com_acao: { type: integer } variacao_acessos: { type: integer, nullable: true } AttendanceSummary: type: object properties: ensaios_realizados: { type: integer } presencas_total: { type: integer } presencas_esperadas: { type: integer } taxa_media: { type: integer, nullable: true } musicos_com_presenca: { type: integer } sem_ensaios: { type: boolean } EngagementRankingItem: type: object required: [id, nome, posicao, total_acoes] properties: id: { type: integer } nome: { type: string } instrumento: { type: string, nullable: true } foto_url: { type: string, nullable: true } posicao: { type: integer } visualizacoes: { type: integer } downloads: { type: integer } buscas: { type: integer } favoritos: { type: integer } repertorios: { type: integer } dias_ativos: { type: integer } sessoes: { type: integer } total_acoes: { type: number } SheetRankingItem: type: object required: [id, titulo, visualizacoes, downloads, acessos_pdf] properties: id: { type: integer } titulo: { type: string } compositor: { type: string, nullable: true } visualizacoes: { type: integer } downloads: { type: integer } acessos_pdf: { type: integer } usuarios: { type: integer } instrumentos_explorados: { type: integer } PartRankingItem: type: object properties: id: { type: integer, nullable: true } instrumento: { type: string } partitura_titulo: { type: string } visualizacoes: { type: integer } downloads: { type: integer } acessos_pdf: { type: integer } AttendanceRankingItem: type: object required: [id, nome, presencas, ensaios, taxa, estado, posicao] properties: id: { type: integer } nome: { type: string } instrumento: { type: string, nullable: true } familia: { type: string } foto_url: { type: string, nullable: true } presencas: { type: integer } ensaios: { type: integer } taxa: { type: integer, nullable: true } estado: { type: string, enum: [com_dados, sem_ensaios] } posicao: { type: integer } AttendanceFamilyItem: type: object properties: familia: { type: string } musicos: { type: integer } ensaios: { type: integer } presencas: { type: integer } esperadas: { type: integer } taxa: { type: integer, nullable: true } estado: { type: string, enum: [com_dados, sem_ensaios] } AnalyticsTrendItem: type: object required: [data] properties: data: { type: string, format: date } total: { type: number } presentes: { type: integer } AnalyticsInsight: type: object required: [id, tipo, titulo, descricao, severidade, evidencias, confianca] properties: id: { type: string } tipo: { type: string, enum: [alerta, reconhecimento] } titulo: { type: string } descricao: { type: string } severidade: { type: string, enum: [alta, media, info] } evidencias: { type: object, additionalProperties: true } confianca: { type: string, enum: [alta, media] } AnalyticsProjections: type: object nullable: true properties: acoes: { type: integer } acessos_pdf: { type: integer } downloads: { type: integer } fator: { type: number } confianca: { type: string, enum: [alta, media] } AnalyticsOverviewResponse: type: object required: [periodo, resumo, insights, rankings, projecoes, amostras] properties: periodo: { $ref: '#/components/schemas/AnalyticsPeriod' } resumo: type: object properties: engajamento: { $ref: '#/components/schemas/EngagementSummary' } partituras: { $ref: '#/components/schemas/SheetSummary' } assiduidade: { $ref: '#/components/schemas/AttendanceSummary' } insights: type: array items: { $ref: '#/components/schemas/AnalyticsInsight' } rankings: type: object properties: engajamento: { type: array, items: { $ref: '#/components/schemas/EngagementRankingItem' } } partituras: { type: array, items: { $ref: '#/components/schemas/SheetRankingItem' } } assiduidade: { type: array, items: { $ref: '#/components/schemas/AttendanceRankingItem' } } projecoes: { $ref: '#/components/schemas/AnalyticsProjections' } amostras: { type: object, additionalProperties: { type: integer } } EngagementAnalyticsDetail: type: object properties: resumo: { $ref: '#/components/schemas/EngagementSummary' } ranking: { type: array, items: { $ref: '#/components/schemas/EngagementRankingItem' } } tendencia: { type: array, items: { $ref: '#/components/schemas/AnalyticsTrendItem' } } comparacao: type: object properties: { resumo: { $ref: '#/components/schemas/EngagementSummary' } } amostras: { type: object, additionalProperties: { type: integer } } SheetAnalyticsDetail: type: object properties: resumo: { $ref: '#/components/schemas/SheetSummary' } ranking: { type: array, items: { $ref: '#/components/schemas/SheetRankingItem' } } partes: { type: array, items: { $ref: '#/components/schemas/PartRankingItem' } } tendencia: { type: array, items: { $ref: '#/components/schemas/AnalyticsTrendItem' } } comparacao: type: object properties: { resumo: { $ref: '#/components/schemas/SheetSummary' } } amostras: { type: object, additionalProperties: { type: integer } } AttendanceAnalyticsDetail: type: object properties: resumo: { $ref: '#/components/schemas/AttendanceSummary' } ranking: { type: array, items: { $ref: '#/components/schemas/AttendanceRankingItem' } } naipes: { type: array, items: { $ref: '#/components/schemas/AttendanceFamilyItem' } } tendencia: { type: array, items: { $ref: '#/components/schemas/AnalyticsTrendItem' } } comparacao: type: object properties: { resumo: { $ref: '#/components/schemas/AttendanceSummary' } } amostra: { type: object, additionalProperties: { type: integer } } AnalyticsDetailResponse: type: object required: [periodo, view, projecao, insights] properties: periodo: { $ref: '#/components/schemas/AnalyticsPeriod' } view: { type: string, enum: [engajamento, partituras, assiduidade] } engajamento: { $ref: '#/components/schemas/EngagementAnalyticsDetail' } partituras: { $ref: '#/components/schemas/SheetAnalyticsDetail' } assiduidade: { $ref: '#/components/schemas/AttendanceAnalyticsDetail' } projecao: { $ref: '#/components/schemas/AnalyticsProjection' } insights: { type: array, items: { $ref: '#/components/schemas/AnalyticsInsight' } } AuditUser: type: object properties: id: { type: integer } nome: { type: string } AuditActivity: type: object properties: id: { type: integer } tipo: { type: string } titulo: { type: string, nullable: true } detalhes: { type: string, nullable: true } criado_em: { type: string } usuario_nome: { type: string, nullable: true } usuario_id: { type: integer, nullable: true } AuditActivitiesResponse: type: object required: [periodo, usuarios, atividades, total] properties: periodo: { $ref: '#/components/schemas/AnalyticsPeriod' } usuarios: { type: array, items: { $ref: '#/components/schemas/AuditUser' } } atividades: { type: array, items: { $ref: '#/components/schemas/AuditActivity' } } total: { type: integer } HealthResponse: type: object required: [status, checks, timestamp] properties: status: type: string enum: [ok, unavailable] checks: type: object required: [database, storage, rateLimit, authentication] properties: database: type: string enum: [ok, missing, unavailable] storage: type: string enum: [configured, missing] rateLimit: type: string enum: [configured, missing] authentication: type: string enum: [configured, missing] timestamp: type: string format: date-time # Auth LoginRequest: type: object properties: username: type: string pin: type: string required: - username - pin LoginResponse: type: object properties: token: type: string user: $ref: '#/components/schemas/User' CheckUserRequest: type: object properties: username: type: string required: - username ChangePinRequest: type: object properties: pin_atual: type: string pin_novo: type: string required: - pin_atual - pin_novo # User User: type: object properties: id: type: integer username: type: string nome: type: string instrumento: type: string is_admin: type: integer foto_url: type: string nullable: true criado_em: type: string format: date-time UserCreate: type: object properties: username: type: string nome: type: string instrumento: type: string pin: type: string is_admin: type: integer required: - username - nome - instrumento - pin UserUpdate: type: object properties: nome: type: string instrumento: type: string is_admin: type: integer # Categoria Categoria: type: object properties: id: type: integer nome: type: string emoji: type: string cor: type: string ordem: type: integer CategoriaCreate: type: object properties: nome: type: string emoji: type: string cor: type: string required: - nome CategoriaUpdate: type: object properties: nome: type: string emoji: type: string cor: type: string CategoriaReorder: type: object properties: ordem: type: array items: type: integer # Partitura Partitura: type: object properties: id: type: integer titulo: type: string compositor: type: string arranjador: type: string nullable: true categoria_id: type: integer categoria_nome: type: string categoria_emoji: type: string categoria_cor: type: string ano: type: integer nullable: true descricao: type: string nullable: true arquivo_nome: type: string arquivo_tamanho: type: integer has_audio: type: boolean audio_name: type: string nullable: true audio_mime: type: string nullable: true audio_size: type: integer nullable: true youtube_url: type: string nullable: true destaque: type: integer total_partes: type: integer criado_em: type: string format: date-time PartituraUpdate: type: object properties: titulo: type: string compositor: type: string arranjador: type: string categoria_id: type: integer ano: type: integer descricao: type: string destaque: type: integer # Parte Parte: type: object properties: id: type: integer partitura_id: type: integer instrumento: type: string arquivo_nome: type: string # Favorito Favorito: type: object properties: id: type: integer partitura_id: type: integer titulo: type: string compositor: type: string FavoritosIds: type: object properties: ids: type: array items: type: integer # Atividade Atividade: type: object properties: id: type: integer tipo: type: string titulo: type: string subtitulo: type: string usuario_id: type: integer usuario_nome: type: string criado_em: type: string format: date-time # Estatisticas Estatisticas: type: object properties: total_partituras: type: integer total_usuarios: type: integer total_downloads: type: integer total_categorias: type: integer EstatisticasAdmin: type: object properties: total_partituras: type: integer total_usuarios: type: integer total_downloads: type: integer downloads_mes: type: integer usuarios_ativos: type: integer Instrumento: type: object properties: instrumento: type: string total: type: integer # Repertorio Repertorio: type: object properties: id: type: integer nome: type: string descricao: type: string nullable: true ativo: type: integer criado_em: type: string format: date-time partituras: type: array items: $ref: '#/components/schemas/Partitura' RepertorioCreate: type: object properties: nome: type: string descricao: type: string required: - nome RepertorioUpdate: type: object properties: nome: type: string descricao: type: string ativo: type: integer RepertorioInstrumento: type: object properties: instrumento: type: string total: type: integer RepertorioDownloadItem: type: object required: [id, titulo, ordem] properties: id: type: integer titulo: type: string ordem: type: integer parte_id: type: integer instrumento: type: string motivo: type: string enum: [parte_ausente, arquivo_ausente] RepertorioDownloadAvailability: type: object required: - instrumento - total - disponiveis_count - ausentes_count - completo - disponiveis - ausentes properties: instrumento: type: string total: type: integer disponiveis_count: type: integer ausentes_count: type: integer completo: type: boolean disponiveis: type: array items: $ref: '#/components/schemas/RepertorioDownloadItem' ausentes: type: array items: $ref: '#/components/schemas/RepertorioDownloadItem' AddPartituraToRepertorio: type: object properties: partitura_id: type: integer required: - partitura_id ReorderPartituras: type: object properties: ordem: type: array items: type: integer paths: # ==================== HEALTH ==================== /api/health: get: tags: [Health] summary: Health check operationId: healthCheck responses: '200': description: API pronta para receber tráfego content: application/json: schema: $ref: '#/components/schemas/HealthResponse' '503': description: Dependência obrigatória ausente ou indisponível content: application/json: schema: $ref: '#/components/schemas/HealthResponse' # ==================== AUTH ==================== /api/login: post: tags: [Auth] summary: Fazer login operationId: login requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LoginRequest' responses: '200': description: Login bem-sucedido content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '401': description: Credenciais inválidas content: application/json: schema: $ref: '#/components/schemas/Error' '429': description: Limite de tentativas excedido content: application/json: schema: type: object required: [error, retryAfter] properties: error: type: string retryAfter: type: integer '503': description: Serviço de autenticação indisponível content: application/json: schema: $ref: '#/components/schemas/Error' /api/check-user: post: tags: [Auth] summary: Verificar se usuário existe operationId: checkUser requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CheckUserRequest' responses: '200': description: Usuário encontrado content: application/json: schema: type: object properties: exists: type: boolean nome: type: string instrumento: type: string '429': description: Limite de consultas excedido content: application/json: schema: type: object required: [exists, error] properties: exists: type: boolean error: type: string retryAfter: type: integer '503': description: Serviço de autenticação indisponível content: application/json: schema: type: object required: [exists, error] properties: exists: type: boolean error: type: string /api/change-pin: post: tags: [Auth] summary: Alterar PIN do usuário operationId: changePin security: - BearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChangePinRequest' responses: '200': description: PIN alterado content: application/json: schema: $ref: '#/components/schemas/Success' '401': description: PIN atual incorreto content: application/json: schema: $ref: '#/components/schemas/Error' # ==================== PARTITURAS ==================== /api/partituras: get: tags: [Partituras] summary: Listar partituras operationId: getPartituras parameters: - name: categoria in: query schema: type: integer description: Filtrar por categoria - name: busca in: query schema: type: string description: Buscar por título ou compositor - name: destaque in: query schema: type: string enum: ['1'] description: Apenas partituras em destaque responses: '200': description: Lista de partituras content: application/json: schema: type: array items: $ref: '#/components/schemas/Partitura' post: tags: [Partituras] summary: Criar partitura (admin) operationId: createPartitura security: - BearerAuth: [] requestBody: required: true content: multipart/form-data: schema: type: object properties: titulo: type: string compositor: type: string arranjador: type: string categoria: type: integer ano: type: integer descricao: type: string destaque: type: string enum: ['0', '1'] arquivo: type: string format: binary required: - titulo - compositor - categoria - arquivo responses: '201': description: Partitura criada content: application/json: schema: type: object properties: success: type: boolean id: type: integer message: type: string '409': description: Partitura duplicada content: application/json: schema: $ref: '#/components/schemas/Error' /api/partituras/upload-pasta: post: tags: [Partituras] summary: Upload de pasta com múltiplas partes (admin) operationId: uploadPastaPartitura security: - BearerAuth: [] requestBody: required: true content: multipart/form-data: schema: type: object properties: titulo: type: string compositor: type: string arranjador: type: string categoria: type: integer ano: type: integer total_arquivos: type: integer required: - titulo - categoria - total_arquivos responses: '201': description: Partitura criada com partes content: application/json: schema: type: object properties: success: type: boolean id: type: integer partes_criadas: type: integer message: type: string /api/partituras/{id}: get: tags: [Partituras] summary: Obter partitura por ID operationId: getPartitura parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Partitura encontrada content: application/json: schema: $ref: '#/components/schemas/Partitura' '404': description: Partitura não encontrada content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: [Partituras] summary: Atualizar partitura (admin) operationId: updatePartitura security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartituraUpdate' responses: '200': description: Partitura atualizada content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: [Partituras] summary: Deletar partitura (admin) operationId: deletePartitura security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Partitura removida content: application/json: schema: $ref: '#/components/schemas/Success' /api/partituras/{id}/audio: put: tags: [Partituras] summary: Anexar ou substituir áudio oficial (admin) operationId: uploadPartituraAudio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: multipart/form-data: schema: type: object required: [audio] properties: audio: { type: string, format: binary } responses: '200': { description: Áudio salvo } '400': { description: Arquivo inválido } delete: tags: [Partituras] summary: Remover áudio oficial (admin) operationId: removePartituraAudio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: { type: integer } responses: '200': { description: Áudio removido } /api/partituras/{id}/youtube: put: tags: [Partituras] summary: Definir ou remover link do YouTube (admin) operationId: updatePartituraYoutube security: - BearerAuth: [] parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: type: object properties: youtube_url: { type: string, nullable: true } responses: '200': { description: Link atualizado } '400': { description: URL inválida } /api/partituras/{id}/audio/access: get: tags: [Partituras] summary: Emitir URL temporária para reprodução operationId: getPartituraAudioAccess security: - BearerAuth: [] parameters: - name: id in: path required: true schema: { type: integer } responses: '200': description: URL assinada content: application/json: schema: type: object properties: url: { type: string, format: uri } expires_at: { type: integer } /api/partituras/{id}/audio/stream: head: tags: [Partituras] summary: Consultar tamanho e faixas do áudio operationId: headPartituraAudio parameters: - name: id in: path required: true schema: { type: integer } - name: exp in: query required: true schema: { type: integer } - name: sig in: query required: true schema: { type: string } responses: '200': { description: Metadados do áudio } '206': { description: Metadados da faixa parcial } '403': { description: Assinatura inválida ou expirada } '416': { description: Faixa inválida } get: tags: [Partituras] summary: Entregar áudio via URL temporária e HTTP Range operationId: streamPartituraAudio parameters: - name: id in: path required: true schema: { type: integer } - name: exp in: query required: true schema: { type: integer } - name: sig in: query required: true schema: { type: string } responses: '200': { description: Áudio completo } '206': { description: Faixa parcial } '416': { description: Faixa inválida } /api/partituras/{id}/partes: get: tags: [Partes] summary: Listar partes de uma partitura operationId: getPartesPartitura security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Lista de partes content: application/json: schema: type: array items: $ref: '#/components/schemas/Parte' post: tags: [Partes] summary: Adicionar parte a uma partitura (admin) operationId: addParte security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: multipart/form-data: schema: type: object properties: instrumento: type: string arquivo: type: string format: binary required: - instrumento - arquivo responses: '201': description: Parte adicionada content: application/json: schema: $ref: '#/components/schemas/Success' # ==================== PARTES (rotas independentes) ==================== /api/partes/{id}/substituir: put: tags: [Partes] summary: Substituir arquivo de uma parte (admin) operationId: substituirParte security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer description: ID da parte (não da partitura) requestBody: required: true content: multipart/form-data: schema: type: object properties: arquivo: type: string format: binary required: - arquivo responses: '200': description: Parte substituída content: application/json: schema: $ref: '#/components/schemas/Success' /api/partes/{id}: delete: tags: [Partes] summary: Deletar parte (admin) operationId: deleteParte security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer description: ID da parte (não da partitura) responses: '200': description: Parte removida content: application/json: schema: $ref: '#/components/schemas/Success' # ==================== DOWNLOADS ==================== /api/download/{id}: get: tags: [Partituras] summary: Download da partitura completa operationId: downloadPartitura security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Arquivo PDF content: application/pdf: schema: type: string format: binary '404': description: Arquivo não encontrado content: application/json: schema: $ref: '#/components/schemas/Error' /api/download/parte/{id}: get: tags: [Partes] summary: Download de uma parte específica operationId: downloadParte security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Arquivo PDF content: application/pdf: schema: type: string format: binary # ==================== CATEGORIAS ==================== /api/categorias: get: tags: [Categorias] summary: Listar categorias operationId: getCategorias responses: '200': description: Lista de categorias content: application/json: schema: type: array items: $ref: '#/components/schemas/Categoria' post: tags: [Categorias] summary: Criar categoria (admin) operationId: createCategoria security: - BearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CategoriaCreate' responses: '201': description: Categoria criada content: application/json: schema: $ref: '#/components/schemas/Success' /api/categorias/{id}: put: tags: [Categorias] summary: Atualizar categoria (admin) operationId: updateCategoria security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CategoriaUpdate' responses: '200': description: Categoria atualizada content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: [Categorias] summary: Deletar categoria (admin) operationId: deleteCategoria security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Categoria removida content: application/json: schema: $ref: '#/components/schemas/Success' /api/categorias/reorder: post: tags: [Categorias] summary: Reordenar categorias (admin) operationId: reorderCategorias security: - BearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CategoriaReorder' responses: '200': description: Categorias reordenadas content: application/json: schema: $ref: '#/components/schemas/Success' # ==================== FAVORITOS ==================== /api/favoritos: get: tags: [Favoritos] summary: Listar favoritos do usuário operationId: getFavoritos security: - BearerAuth: [] responses: '200': description: Lista de favoritos content: application/json: schema: type: array items: $ref: '#/components/schemas/Favorito' /api/favoritos/ids: get: tags: [Favoritos] summary: Obter IDs dos favoritos operationId: getFavoritosIds security: - BearerAuth: [] responses: '200': description: Lista de IDs content: application/json: schema: $ref: '#/components/schemas/FavoritosIds' /api/favoritos/{id}: post: tags: [Favoritos] summary: Adicionar partitura aos favoritos operationId: addFavorito security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer description: ID da partitura responses: '200': description: Favorito adicionado content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: [Favoritos] summary: Remover partitura dos favoritos operationId: removeFavorito security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer description: ID da partitura responses: '200': description: Favorito removido content: application/json: schema: $ref: '#/components/schemas/Success' # ==================== ATIVIDADES ==================== /api/atividades: get: tags: [Atividades] summary: Listar atividades recentes operationId: getAtividades responses: '200': description: Lista de atividades content: application/json: schema: type: array items: $ref: '#/components/schemas/Atividade' /api/minhas-atividades: get: tags: [Atividades] summary: Listar atividades do usuário logado operationId: getAtividadesUsuario security: - BearerAuth: [] responses: '200': description: Lista de atividades do usuário content: application/json: schema: type: array items: $ref: '#/components/schemas/Atividade' # ==================== ESTATISTICAS ==================== /api/estatisticas: get: tags: [Estatisticas] summary: Obter estatísticas públicas operationId: getEstatisticas responses: '200': description: Estatísticas content: application/json: schema: $ref: '#/components/schemas/Estatisticas' /api/instrumentos: get: tags: [Estatisticas] summary: Listar instrumentos disponíveis operationId: getInstrumentos responses: '200': description: Lista de instrumentos content: application/json: schema: type: array items: $ref: '#/components/schemas/Instrumento' /api/admin/estatisticas: get: tags: [Estatisticas] summary: Obter estatísticas administrativas operationId: getEstatisticasAdmin security: - BearerAuth: [] responses: '200': description: Estatísticas admin content: application/json: schema: $ref: '#/components/schemas/EstatisticasAdmin' # ==================== USUARIOS (ADMIN) ==================== /api/usuarios: get: tags: [Usuarios] summary: Listar usuários (admin) operationId: getUsuarios security: - BearerAuth: [] responses: '200': description: Lista de usuários content: application/json: schema: type: array items: $ref: '#/components/schemas/User' post: tags: [Usuarios] summary: Criar usuário (admin) operationId: createUsuario security: - BearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserCreate' responses: '201': description: Usuário criado content: application/json: schema: $ref: '#/components/schemas/Success' /api/usuarios/{id}: get: tags: [Usuarios] summary: Obter usuário por ID (admin) operationId: getUsuario security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Usuário encontrado content: application/json: schema: $ref: '#/components/schemas/User' put: tags: [Usuarios] summary: Atualizar usuário (admin) operationId: updateUsuario security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserUpdate' responses: '200': description: Usuário atualizado content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: [Usuarios] summary: Deletar usuário (admin) operationId: deleteUsuario security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Usuário removido content: application/json: schema: $ref: '#/components/schemas/Success' # ==================== PERFIL ==================== /api/perfil: get: tags: [Perfil] summary: Obter perfil do usuário logado operationId: getPerfil security: - BearerAuth: [] responses: '200': description: Perfil do usuário content: application/json: schema: $ref: '#/components/schemas/User' put: tags: [Perfil] summary: Atualizar perfil operationId: updatePerfil security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: nome: type: string instrumento: type: string responses: '200': description: Perfil atualizado content: application/json: schema: $ref: '#/components/schemas/Success' /api/perfil/foto: post: tags: [Perfil] summary: Upload de foto de perfil operationId: uploadFotoPerfil security: - BearerAuth: [] requestBody: required: true content: multipart/form-data: schema: type: object properties: foto: type: string format: binary required: - foto responses: '200': description: Foto atualizada content: application/json: schema: type: object properties: success: type: boolean foto_url: type: string # ==================== REPERTORIO ==================== /api/repertorio/ativo: get: tags: [Repertorio] summary: Obter repertório ativo operationId: getRepertorioAtivo security: - BearerAuth: [] parameters: - name: all in: query description: Se true, retorna todos os repertórios ativos required: false schema: type: boolean responses: '200': description: Repertório ativo content: application/json: schema: oneOf: - $ref: '#/components/schemas/Repertorio' - type: array items: $ref: '#/components/schemas/Repertorio' '404': description: Nenhum repertório ativo content: application/json: schema: $ref: '#/components/schemas/Error' /api/repertorio/{id}: get: tags: [Repertorio] summary: Obter repertório por ID operationId: getRepertorio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Repertório content: application/json: schema: $ref: '#/components/schemas/Repertorio' put: tags: [Repertorio] summary: Atualizar repertório (admin) operationId: updateRepertorio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RepertorioUpdate' responses: '200': description: Repertório atualizado content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: [Repertorio] summary: Deletar repertório (admin) operationId: deleteRepertorio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Repertório removido content: application/json: schema: $ref: '#/components/schemas/Success' /api/repertorio/{id}/download: get: tags: [Repertorio] summary: Download do repertório (ZIP) operationId: downloadRepertorio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Arquivo ZIP content: application/zip: schema: type: string format: binary /api/repertorio/{id}/disponibilidade-download: get: tags: [Repertorio] summary: Conferir partes disponíveis antes do download operationId: getRepertorioDownloadAvailability security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer - name: instrumento in: query schema: type: string - name: partituras in: query description: IDs de partituras separados por vírgula schema: type: string responses: '200': description: Disponibilidade das partes e arquivos solicitados content: application/json: schema: $ref: '#/components/schemas/RepertorioDownloadAvailability' '400': description: Instrumento não especificado content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Repertório ou seleção não encontrados content: application/json: schema: $ref: '#/components/schemas/Error' /api/repertorio/{id}/instrumentos: get: tags: [Repertorio] summary: Listar instrumentos disponíveis no repertório operationId: getRepertorioInstrumentos security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Lista de instrumentos content: application/json: schema: type: array items: $ref: '#/components/schemas/RepertorioInstrumento' /api/partituras/{id}/in-repertorio: get: tags: [Repertorio] summary: Verificar se partitura está no repertório ativo operationId: isPartituraInRepertorioAtivo security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Status content: application/json: schema: type: object properties: in_repertorio: type: boolean /api/repertorios: get: tags: [Repertorio] summary: Listar todos os repertórios (admin) operationId: listRepertorios security: - BearerAuth: [] responses: '200': description: Lista de repertórios content: application/json: schema: type: array items: $ref: '#/components/schemas/Repertorio' post: tags: [Repertorio] summary: Criar repertório (admin) operationId: createRepertorio security: - BearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RepertorioCreate' responses: '201': description: Repertório criado content: application/json: schema: $ref: '#/components/schemas/Success' /api/repertorio/{id}/partituras: post: tags: [Repertorio] summary: Adicionar partitura ao repertório (admin) operationId: addPartituraToRepertorio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddPartituraToRepertorio' responses: '200': description: Partitura adicionada content: application/json: schema: $ref: '#/components/schemas/Success' /api/repertorio/{repertorioId}/partituras/{partituraId}: delete: tags: [Repertorio] summary: Remover partitura do repertório (admin) operationId: removePartituraFromRepertorio security: - BearerAuth: [] parameters: - name: repertorioId in: path required: true schema: type: integer - name: partituraId in: path required: true schema: type: integer responses: '200': description: Partitura removida content: application/json: schema: $ref: '#/components/schemas/Success' /api/repertorio/{id}/reorder: put: tags: [Repertorio] summary: Reordenar partituras no repertório (admin) operationId: reorderPartiturasRepertorio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ReorderPartituras' responses: '200': description: Partituras reordenadas content: application/json: schema: $ref: '#/components/schemas/Success' /api/repertorio/{id}/duplicar: post: tags: [Repertorio] summary: Duplicar repertório (admin) operationId: duplicarRepertorio security: - BearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: '201': description: Repertório duplicado content: application/json: schema: type: object properties: success: type: boolean id: type: integer message: type: string /api/version: get: tags: [Health] operationId: getVersion responses: '200': description: Versão atual content: application/json: schema: { type: object, additionalProperties: true } /api/perfil/foto/{filename}: get: tags: [Perfil] operationId: getFotoPerfil parameters: - { name: filename, in: path, required: true, schema: { type: string } } responses: '200': description: Imagem do perfil content: image/jpeg: { schema: { type: string, format: binary } } '400': { description: Nome inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } '404': { description: Foto não encontrada, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/partes/{id}/renomear: put: tags: [Partes] operationId: renomearParte security: [{ BearerAuth: [] }] parameters: - { name: id, in: path, required: true, schema: { type: integer } } requestBody: required: true content: application/json: schema: type: object required: [instrumento] properties: { instrumento: { type: string } } responses: '200': { description: Parte renomeada, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } '400': { description: Entrada inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } '401': { description: Não autenticado, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/partituras/{id}/corrigir-bombardinos: post: tags: [Partituras] operationId: corrigirBombardinos security: [{ BearerAuth: [] }] parameters: - { name: id, in: path, required: true, schema: { type: integer } } requestBody: required: true content: multipart/form-data: { schema: { type: object, additionalProperties: true } } responses: '200': { description: Partes corrigidas, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } '400': { description: Lote inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/tracking/events: post: tags: [Estatisticas] operationId: registrarTrackingEvent security: [{ BearerAuth: [] }] requestBody: required: true content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '200': { description: Evento registrado, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } '400': { description: Evento inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } '401': { description: Não autenticado, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/tracking/search: post: tags: [Estatisticas] operationId: registrarBusca security: [{ BearerAuth: [] }] requestBody: required: true content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '200': { description: Busca registrada, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } '400': { description: Entrada inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/tracking/session/end: post: tags: [Estatisticas] operationId: encerrarTrackingSession security: [{ BearerAuth: [] }] requestBody: content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '200': { description: Sessão encerrada, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } /api/admin/analytics/dashboard: get: tags: [Estatisticas] operationId: getAnalyticsDashboard security: [{ BearerAuth: [] }] parameters: - { name: section, in: query, schema: { type: string } } - { name: period, in: query, schema: { type: string } } responses: '200': { description: Dashboard analítico, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '401': { description: Não autenticado, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/admin/analytics/overview: get: tags: [Estatisticas] operationId: getAnalyticsOverview security: [{ BearerAuth: [] }] parameters: - { name: inicio, in: query, schema: { type: string, format: date } } - { name: fim, in: query, schema: { type: string, format: date } } responses: '200': { description: Visão geral do analytics, content: { application/json: { schema: { $ref: '#/components/schemas/AnalyticsOverviewResponse' } } } } '400': { description: Período inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } '401': { description: Não autenticado, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/admin/analytics/detail: get: tags: [Estatisticas] operationId: getAnalyticsDetail security: [{ BearerAuth: [] }] parameters: - { name: view, in: query, required: true, schema: { type: string, enum: [engajamento, partituras, assiduidade] } } - { name: inicio, in: query, schema: { type: string, format: date } } - { name: fim, in: query, schema: { type: string, format: date } } responses: '200': { description: Detalhe do analytics, content: { application/json: { schema: { $ref: '#/components/schemas/AnalyticsDetailResponse' } } } } '400': { description: Visão inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } '401': { description: Não autenticado, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/admin/auditoria: get: tags: [Estatisticas] operationId: getAuditActivities security: [{ BearerAuth: [] }] parameters: - { name: inicio, in: query, schema: { type: string, format: date } } - { name: fim, in: query, schema: { type: string, format: date } } - { name: atividade_usuario_id, in: query, schema: { type: integer } } - { name: atividades_limit, in: query, schema: { type: integer, minimum: 1, maximum: 100 } } - { name: atividades_offset, in: query, schema: { type: integer, minimum: 0 } } responses: '200': { description: Atividades administrativas, content: { application/json: { schema: { $ref: '#/components/schemas/AuditActivitiesResponse' } } } } '400': { description: Período inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } '401': { description: Não autenticado, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/assets/list/backgrounds: get: tags: [Health] operationId: listBackgroundAssets responses: '200': { description: Backgrounds públicos, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/assets/{folder}/{filename}: get: tags: [Health] operationId: getPublicAsset parameters: - { name: folder, in: path, required: true, schema: { type: string } } - { name: filename, in: path, required: true, schema: { type: string } } responses: '200': { description: Conteúdo do asset, content: { application/octet-stream: { schema: { type: string, format: binary } } } } '404': { description: Asset não encontrado, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/admin/assets/list: get: tags: [Usuarios] operationId: listAdminAssets security: [{ BearerAuth: [] }] parameters: - { name: prefix, in: query, schema: { type: string } } - { name: cursor, in: query, schema: { type: string } } responses: '200': { description: Assets gerenciáveis, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/admin/assets/upload: post: tags: [Usuarios] operationId: uploadAdminAsset security: [{ BearerAuth: [] }] requestBody: required: true content: { multipart/form-data: { schema: { type: object, additionalProperties: true } } } responses: '201': { description: Asset enviado, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } '400': { description: Arquivo inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/admin/assets: delete: tags: [Usuarios] operationId: deleteAdminAsset security: [{ BearerAuth: [] }] parameters: - { name: key, in: query, required: true, schema: { type: string } } responses: '200': { description: Asset excluído, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } '400': { description: Chave inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/admin/avisos: get: tags: [Usuarios] operationId: listAvisos security: [{ BearerAuth: [] }] responses: '200': { description: Lista de avisos, content: { application/json: { schema: { type: array, items: { type: object, additionalProperties: true } } } } } post: tags: [Usuarios] operationId: createAviso security: [{ BearerAuth: [] }] requestBody: required: true content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '201': { description: Aviso criado, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } /api/admin/avisos/{id}: put: tags: [Usuarios] operationId: updateAviso security: [{ BearerAuth: [] }] parameters: - { name: id, in: path, required: true, schema: { type: integer } } requestBody: required: true content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '200': { description: Aviso atualizado, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } delete: tags: [Usuarios] operationId: deleteAviso security: [{ BearerAuth: [] }] parameters: - { name: id, in: path, required: true, schema: { type: integer } } responses: '200': { description: Aviso excluído, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } /api/avisos/nao-lidos: get: tags: [Atividades] operationId: getAvisosNaoLidos security: [{ BearerAuth: [] }] responses: '200': { description: Avisos não lidos, content: { application/json: { schema: { type: array, items: { type: object, additionalProperties: true } } } } } /api/avisos/{id}/lido: post: tags: [Atividades] operationId: marcarAvisoLido security: [{ BearerAuth: [] }] parameters: - { name: id, in: path, required: true, schema: { type: integer } } responses: '200': { description: Aviso marcado como lido, content: { application/json: { schema: { $ref: '#/components/schemas/Success' } } } } /api/config/recesso: get: tags: [Health] operationId: getModoRecesso responses: '200': { description: Estado do recesso, content: { application/json: { schema: { type: object, properties: { ativo: { type: boolean } } } } } } put: tags: [Health] operationId: updateModoRecesso security: [{ BearerAuth: [] }] requestBody: required: true content: { application/json: { schema: { type: object, required: [ativo], properties: { ativo: { type: boolean } } } } } responses: '200': { description: Recesso atualizado, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/config/tutoriais: get: tags: [Health] operationId: getTutoriaisAtivos responses: '200': { description: Estado global dos tutoriais, content: { application/json: { schema: { type: object, required: [ativo], properties: { ativo: { type: boolean } } } } } } put: tags: [Health] operationId: updateTutoriaisAtivos security: [{ BearerAuth: [] }] requestBody: required: true content: { application/json: { schema: { type: object, required: [ativo], properties: { ativo: { type: boolean } } } } } responses: '200': { description: Tutoriais atualizados, content: { application/json: { schema: { type: object, required: [ativo], properties: { ativo: { type: boolean }, mensagem: { type: string } } } } } } '400': { description: Valor inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/config/dias-ensaio: get: tags: [Health] operationId: getDiasEnsaio responses: '200': { description: Calendário de ensaios, content: { application/json: { schema: { type: object, additionalProperties: true } } } } put: tags: [Health] operationId: updateDiasEnsaio security: [{ BearerAuth: [] }] requestBody: required: true content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '200': { description: Calendário atualizado, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '400': { description: Calendário inválido, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/presenca/minhas/stats: get: tags: [Estatisticas] operationId: getMinhasEstatisticasPresenca security: [{ BearerAuth: [] }] responses: '200': { description: Estatísticas de presença, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/presenca/minhas: get: tags: [Estatisticas] operationId: getMinhasPresencas security: [{ BearerAuth: [] }] responses: '200': { description: Histórico de presença, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/presenca: post: tags: [Estatisticas] operationId: registrarPresencas security: [{ BearerAuth: [] }] requestBody: required: true content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '200': { description: Presenças registradas, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '400': { description: Dados inválidos, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/presenca/todas: get: tags: [Estatisticas] operationId: getTodasPresencas security: [{ BearerAuth: [] }] responses: '200': { description: Ensaios com presença, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/presenca/{data}: get: tags: [Estatisticas] operationId: getDetalhePresenca security: [{ BearerAuth: [] }] parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } responses: '200': { description: Detalhe do ensaio, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '400': { description: Data inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } delete: tags: [Estatisticas] operationId: deleteEnsaioPresenca security: [{ BearerAuth: [] }] parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } responses: '200': { description: Ensaio excluído, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/presenca/{data}/usuario/{usuarioId}: delete: tags: [Estatisticas] operationId: deletePresencaUsuario security: [{ BearerAuth: [] }] parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } - { name: usuarioId, in: path, required: true, schema: { type: integer } } responses: '200': { description: Presença removida, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '404': { description: Presença não encontrada, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/ensaios/{data}/partituras: get: tags: [Repertorio] operationId: getPartiturasEnsaio parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } responses: '200': { description: Partituras do ensaio, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '400': { description: Data inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } post: tags: [Repertorio] operationId: addPartituraEnsaio security: [{ BearerAuth: [] }] parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } requestBody: required: true content: { application/json: { schema: { type: object, required: [partitura_id], properties: { partitura_id: { type: integer } } } } } responses: '200': { description: Partitura adicionada, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/ensaios/{data}/partituras/{partituraId}: delete: tags: [Repertorio] operationId: deletePartituraEnsaio security: [{ BearerAuth: [] }] parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } - { name: partituraId, in: path, required: true, schema: { type: integer } } responses: '200': { description: Partitura removida, content: { application/json: { schema: { type: object, additionalProperties: true } } } } /api/ensaios/{data}/partituras/reorder: put: tags: [Repertorio] operationId: reorderPartiturasEnsaio security: [{ BearerAuth: [] }] parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } requestBody: required: true content: { application/json: { schema: { type: object, additionalProperties: true } } } responses: '200': { description: Ordem atualizada, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '400': { description: Ordem inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } } /api/ensaios/{data}/config: patch: tags: [Repertorio] operationId: updateEnsaioConfig security: [{ BearerAuth: [] }] parameters: - { name: data, in: path, required: true, schema: { type: string, format: date } } requestBody: required: true content: { application/json: { schema: { type: object, properties: { youtube_url: { type: string, format: uri, nullable: true } } } } } responses: '200': { description: Configuração atualizada, content: { application/json: { schema: { type: object, additionalProperties: true } } } } '400': { description: Data ou URL inválida, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }