{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ucp.dev/2026-08-25/schemas/common/types/message_warning.json",
  "title": "Message Warning",
  "type": "object",
  "required": [
    "type",
    "code",
    "content"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "warning",
      "description": "Message type discriminator."
    },
    "path": {
      "type": "string",
      "description": "RFC 9535 JSONPath to the component the message refers to (e.g., $.line_items[0])."
    },
    "code": {
      "$ref": "https://ucp.dev/2026-08-25/schemas/common/types/warning_code.json"
    },
    "content": {
      "type": "string",
      "description": "Human-readable warning message that MUST be displayed."
    },
    "content_type": {
      "type": "string",
      "enum": [
        "plain",
        "markdown"
      ],
      "default": "plain",
      "description": "Content format, default = plain."
    },
    "presentation": {
      "type": "string",
      "default": "notice",
      "description": "Rendering contract for this warning. 'notice' (default): platform MUST display, MAY dismiss. 'disclosure': platform MUST display in proximity to the path-referenced component, MUST NOT hide or auto-dismiss. See specification for full contract."
    },
    "image_url": {
      "type": "string",
      "format": "uri",
      "description": "URL to a required visual element (e.g., warning symbol, energy class label)."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Reference URL for more information (e.g., regulatory site, registry entry, policy page)."
    }
  }
}