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

**URL:** https://f.docs.rw/t/topic/655
**Category:** Баг-репорты
**Created:** 2026-08-30T21:48:05Z
**Posts:** 2

## Post 1 by @AlexandrErnst — 2026-08-30T21:48:05Z

**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`.

---

## Post 2 by @remnawave — 2026-08-30T22:46:36Z

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

---

## Post 3 by @system — 2026-09-01T22:46:39Z

Эта тема была автоматически закрыта через 2 дня после последнего ответа. В ней больше нельзя отвечать.
