{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/scalar/main/json-schema/scalar-oauth-authorize-result-schema.json",
  "title": "oauth-authorize-result",
  "x-generated": "2026-10-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scalar-oauth-api-openapi.yml#/components/schemas/oauth-authorize-result",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "ok"
        },
        "uid": {
          "$ref": "#/$defs/nanoid"
        }
      },
      "required": [
        "status",
        "uid"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "error"
        },
        "error": {
          "type": "string"
        },
        "errorDescription": {
          "type": "string"
        },
        "redirectTo": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "error",
        "errorDescription"
      ],
      "additionalProperties": false
    }
  ],
  "$defs": {
    "nanoid": {
      "type": "string",
      "minLength": 5
    }
  }
}