{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rombik-app/json-schema/rombik-app-oauth-token-request-schema.json",
  "title": "OAuthTokenRequest",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rombik-app-openapi.yml#/components/schemas/OAuthTokenRequest",
  "type": "object",
  "required": [
    "grant_type",
    "code",
    "redirect_uri",
    "client_id"
  ],
  "properties": {
    "grant_type": {
      "type": "string",
      "enum": [
        "authorization_code"
      ]
    },
    "code": {
      "type": "string",
      "description": "одноразовий код зі сторінки згоди; живе 10 хвилин"
    },
    "redirect_uri": {
      "type": "string",
      "description": "той самий, що в authorize-запиті"
    },
    "client_id": {
      "type": "string"
    },
    "client_secret": {
      "type": "string",
      "description": "для конфіденційного клієнта, якщо не передано в HTTP Basic"
    },
    "code_verifier": {
      "type": "string",
      "description": "PKCE: рядок, чий S256-хеш дорівнює code_challenge з authorize"
    }
  }
}