{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/post-mesh-com/json-schema/post-mesh-com-connection-schema.json",
  "title": "Connection",
  "description": "SNS アカウント連携",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/post-mesh-com-openapi.json#/components/schemas/Connection",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "連携 ID"
    },
    "platform": {
      "$ref": "#/$defs/Platform"
    },
    "account_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "連携アカウントの表示名"
    },
    "icon_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "連携アカウントのプロフィールアイコン URL"
    },
    "connected_at": {
      "type": "string",
      "format": "date-time",
      "description": "連携日時"
    }
  },
  "required": [
    "id",
    "platform",
    "account_name",
    "icon_url",
    "connected_at"
  ],
  "$defs": {
    "Platform": {
      "type": "string",
      "enum": [
        "youtube",
        "tiktok",
        "instagram",
        "threads",
        "x",
        "facebook"
      ],
      "description": "SNS プラットフォーム"
    }
  }
}