{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/emmanuelbenami-com/json-schema/emmanuelbenami-com-link-preview-response-schema.json",
  "title": "LinkPreviewResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emmanuelbenami-com-messages-api-openapi.yml#/components/schemas/LinkPreviewResponse",
  "type": "object",
  "properties": {
    "preview": {
      "anyOf": [
        {
          "$ref": "#/$defs/LinkPreview"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "preview"
  ],
  "additionalProperties": false,
  "$defs": {
    "LinkPreview": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "title": {
          "type": "string",
          "maxLength": 240
        },
        "description": {
          "type": "string",
          "maxLength": 500
        },
        "site_name": {
          "type": "string",
          "maxLength": 100
        },
        "domain": {
          "type": "string"
        },
        "image_url": {
          "description": "Same-origin image endpoint, or null when no safe image is available.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "url",
        "title",
        "description",
        "site_name",
        "domain",
        "image_url"
      ],
      "additionalProperties": false
    }
  }
}