{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/a-upgradenet-com/json-schema/a-upgradenet-com-token-request-schema.json",
  "title": "TokenRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/a-upgradenet-com-openapi.json#/components/schemas/TokenRequest",
  "type": "object",
  "required": [
    "grant_type",
    "client_id"
  ],
  "properties": {
    "grant_type": {
      "type": "string",
      "enum": [
        "authorization_code",
        "refresh_token"
      ]
    },
    "client_id": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "description": "authorization_code grant."
    },
    "code_verifier": {
      "type": "string",
      "description": "authorization_code grant (PKCE)."
    },
    "redirect_uri": {
      "type": "string",
      "format": "uri",
      "description": "authorization_code grant."
    },
    "refresh_token": {
      "type": "string",
      "description": "refresh_token grant."
    },
    "resource": {
      "type": "string",
      "format": "uri"
    }
  }
}