Skip to content

[BUG] @Query não reflete o tipo correto no Swagger para int e bool #157

@Maxwell-Alexander-Volus

Description

🐛 Bug Report

📄 Title

Describe the bug briefly and clearly.

🔗 External Link

Insert the bug link in the bug management platform

🖥️ Environment

  • Operating System: Windows 10
  • Application Version: Vaden 1.0.2
  • Dart: 3.11.1

📝 Detailed Description

Ao usar @query com tipos int ou bool, o Swagger sempre
mostra o tipo como string na documentação, mesmo quando
o tipo declarado é int ou bool.

@Controller('/expenses')
@Get('/detail-expenses')
Future<Response> getDetailExpense(
    Request request,
    @Query('id_month_expense') int idMonthExpense,
    @Query('category_expense') String? categoryExpense,
    @Query('payment_type') String? paymentType,
    @Query('payment_made') bool? paymentMade,
    @Query('type_expense') String? typeExpense,
  ) async {

Expected Result

id_month_expense: integer
payment_made: boolean

Actual Result

id_month_expense: string
payment_made: string

📷 Evidence

Image Image

⚠️ Severity

  • Low
  • Medium
  • High
  • Critical

🚨 Priority

  • P1 (High)
  • P2 (Medium)
  • P3 (Low)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions