{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alert-camp/json-schema/alert-camp-device-token-register-schema.json",
  "title": "DeviceTokenRegister",
  "description": "Schema for registering FCM token with device metadata.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alert-camp-auth-api-openapi.yml#/components/schemas/DeviceTokenRegister",
  "properties": {
    "fcm_token": {
      "type": "string",
      "maxLength": 512,
      "minLength": 1,
      "title": "Fcm Token"
    },
    "device_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Device Id",
      "description": "Stable device UUID (generated on client). None for backward compat with old mobile clients."
    },
    "device_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Device Name"
    },
    "platform": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(ios|android)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    },
    "os_version": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Os Version"
    },
    "app_version": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ],
      "title": "App Version"
    }
  },
  "type": "object",
  "required": [
    "fcm_token"
  ]
}