{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/infocert/main/json-schema/infocert-exploded-message-schema.json",
  "title": "Exploded message",
  "description": "A fully exploded version of a message",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/infocert-legalmail-business-openapi.yml#/components/schemas/ExplodedMessage",
  "properties": {
    "mailboxId": {
      "type": "string"
    },
    "folderId": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "payload": {
      "$ref": "#/$defs/ExplodedMessagePart"
    },
    "sizeEstimate": {
      "type": "integer"
    }
  },
  "$defs": {
    "ExplodedMessagePart": {
      "title": "Exploded MessagePart",
      "description": "A MessagePart of a fully exploded message",
      "properties": {
        "id": {
          "type": "string"
        },
        "contentType": {
          "type": "string",
          "format": "contenttype"
        },
        "contentTransferEncoding": {
          "type": "string",
          "format": "contenttransferencoding"
        },
        "filename": {
          "type": "string"
        },
        "headers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MessageHeader"
          }
        },
        "body": {
          "type": "object",
          "properties": {
            "size": {
              "type": "integer",
              "minimum": 0
            },
            "data": {
              "type": "string"
            }
          }
        },
        "parts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExplodedMessagePart"
          }
        }
      }
    },
    "MessageHeader": {
      "title": "A message header",
      "description": "A generic message header with header name and header value. Notable headers like Subject, From, To are typically handled separately.\n",
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    }
  }
}