{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/balladic-com/json-schema/balladic-com-chat-message-response-schema.json",
  "title": "ChatMessageResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/balladic-com-chat-api-openapi.yml#/components/schemas/ChatMessageResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "number": {
      "type": "integer",
      "title": "Number"
    },
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "title": "Conversation Id"
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "title": "User Id"
    },
    "user_name": {
      "type": "string",
      "title": "User Name"
    },
    "user_avatar_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "User Avatar Key"
    },
    "body": {
      "additionalProperties": true,
      "type": "object",
      "title": "Body"
    },
    "reply_to_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reply To Id"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "attachments": {
      "items": {
        "$ref": "#/$defs/ChatAttachmentResponse"
      },
      "type": "array",
      "title": "Attachments"
    }
  },
  "type": "object",
  "required": [
    "id",
    "number",
    "conversation_id",
    "user_id",
    "user_name",
    "user_avatar_key",
    "body",
    "reply_to_id",
    "created_at",
    "attachments"
  ],
  "$defs": {
    "ChatAttachmentResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "number": {
          "type": "integer",
          "title": "Number"
        },
        "filename": {
          "type": "string",
          "title": "Filename"
        },
        "content_type": {
          "type": "string",
          "title": "Content Type"
        },
        "size_bytes": {
          "type": "integer",
          "title": "Size Bytes"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "number",
        "filename",
        "content_type",
        "size_bytes",
        "created_at"
      ],
      "title": "ChatAttachmentResponse"
    }
  }
}