Рассинхрон OpenAPI и runtime validation

Title: PATCH /api/users: telegramId OpenAPI schema does not match runtime validation

Remnawave version: 3.4.1

Hi! There seems to be a schema mismatch for telegramId in UpdateUserBodyDto.

OpenAPI reports:

{
  "telegramId": {
    "type": "array",
    "items": {
      "type": "number"
    }
  }
}

So this request looks valid according to the schema:

{
  "id": 8,
  "telegramId": [123456789]
}

But the API returns HTTP 400:

{
  "message": "Validation failed",
  "errors": [
    {
      "expected": "number",
      "code": "invalid_type",
      "path": ["telegramId"],
      "message": "Invalid input: expected number, received array"
    }
  ]
}

Sending the same value as a scalar works:

{
  "id": 8,
  "telegramId": 123456789
}

This returns HTTP 200 and the value is saved correctly.

So currently the generated OpenAPI schema says number[], while the actual PATCH validator expects number.

I only verified this behavior for PATCH /api/users.

Спасибо! Релиз с временным фиксом будет сегодня.