{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/scalar/main/json-schema/scalar-oauth-client-created-schema.json",
  "title": "oauth-client-created",
  "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-client-created",
  "type": "object",
  "properties": {
    "uid": {
      "$ref": "#/$defs/nanoid"
    },
    "teamUid": {
      "$ref": "#/$defs/nanoid"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "type": {
      "$ref": "#/$defs/oauth-client-type"
    },
    "redirectUris": {
      "minItems": 1,
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2048
      }
    },
    "allowedScopes": {
      "minItems": 1,
      "type": "array",
      "items": {
        "$ref": "#/$defs/oauth-scope"
      }
    },
    "createdBy": {
      "$ref": "#/$defs/nanoid"
    },
    "createdAt": {
      "$ref": "#/$defs/timestamp"
    },
    "clientSecret": {
      "type": "string"
    }
  },
  "required": [
    "uid",
    "teamUid",
    "name",
    "type",
    "redirectUris",
    "allowedScopes",
    "createdBy",
    "createdAt"
  ],
  "additionalProperties": false,
  "$defs": {
    "nanoid": {
      "type": "string",
      "minLength": 5
    },
    "oauth-client-type": {
      "type": "string",
      "enum": [
        "confidential",
        "public"
      ]
    },
    "oauth-scope": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "admin"
      ]
    },
    "timestamp": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}