Skip to content

docs: swager update#44

Open
oismaelash wants to merge 3 commits intoEvolutionAPI:mainfrom
oismaelash:docs/swager-update
Open

docs: swager update#44
oismaelash wants to merge 3 commits intoEvolutionAPI:mainfrom
oismaelash:docs/swager-update

Conversation

@oismaelash
Copy link
Copy Markdown

Description

Esta PR atualiza e melhora a documentação da API Swagger/OpenAPI do projeto. As mudanças incluem:

  • Criação de modelos Swagger dedicados em pkg/core/swagger_models.go para melhor estruturação das respostas da API
  • Atualização do arquivo docs/swagger.yaml com definições completas dos endpoints e modelos
  • Melhoria nas anotações Swagger nos handlers para gerar documentação mais precisa
  • Padronização das estruturas de resposta para erro (400, 401, 403, 404, 500) e sucesso
  • Adição de exemplos (example) nos campos das estruturas para melhor visualização no Swagger UI
  • Inclusão de modelos específicos para diferentes módulos: License, Call, Chat, Message, Community, Newsletter, Polls, User, Instance, Group, Label

Os modelos estão organizados por funcionalidade e incluem:

  • Respostas genéricas e específicas por módulo
  • Metadados de erro padronizados
  • Estruturas de resposta com exemplos claros
  • Suporte para todas as funcionalidades principais da API

Related Issue

Closes #(issue_number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement

Testing

  • Manual testing completed
  • Functionality verified in development environment
  • No breaking changes introduced

Screenshots (if applicable)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have tested my changes thoroughly
  • Any dependent changes have been merged and published

Additional Notes

  • Esta branch foca apenas na melhoria da documentação Swagger, sem alterações funcionais
  • Os modelos são mantidos separadamente em pkg/core/swagger_models.go para facilitar a manutenção
  • O arquivo docs/swagger.yaml é gerado automaticamente a partir das anotações no código Go
  • Para testar, inicie o servidor e acesse /swagger/index.html ou /api/docs

Add centralized swagger models in pkg/core/swagger_models.go to provide consistent API response structures.
Update all handler Swagger annotations to reference these core models instead of generic gin.H responses.
This improves API documentation clarity and ensures consistent response formats across all endpoints.

Additionally, refactor version initialization in main.go to use a function and add WebSocket endpoint documentation.
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @oismaelash, your pull request is larger than the review limit of 150000 diff characters

@oismaelash oismaelash changed the title Docs/swager update docs: swager update Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant