{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sku.md/ucp/draft/product-knowledge-extension.schema.json",
  "name": "md.sku.shopping.product_knowledge",
  "title": "SKU.md Product Knowledge for UCP Catalog",
  "description": "Incubating independent draft that adds external SKU.md document references to UCP Catalog Products.",
  "status": "incubating",
  "draft_label": "draft",
  "extends": [
    "dev.ucp.shopping.catalog.search",
    "dev.ucp.shopping.catalog.lookup"
  ],
  "requires": {
    "protocol": {
      "min": "2026-04-08"
    },
    "capabilities": {
      "dev.ucp.shopping.catalog.search": {
        "min": "2026-04-08"
      },
      "dev.ucp.shopping.catalog.lookup": {
        "min": "2026-04-08"
      }
    }
  },
  "$defs": {
    "document_reference": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "url",
        "schema_version",
        "content_language",
        "market"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "pattern": "^(?!https://[^/?#]*@)https://[^#]+$"
        },
        "schema_version": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9.-]*/[A-Za-z0-9._-]+$"
        },
        "content_language": {
          "type": "string",
          "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
        },
        "market": {
          "type": "object",
          "additionalProperties": false,
          "required": ["country", "currency"],
          "properties": {
            "country": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        },
        "revision": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      }
    },
    "product_knowledge": {
      "type": "object",
      "additionalProperties": false,
      "required": ["documents"],
      "properties": {
        "documents": {
          "type": "array",
          "minItems": 1,
          "maxItems": 8,
          "items": {
            "$ref": "#/$defs/document_reference"
          }
        }
      }
    },
    "catalog_product": {
      "type": "object",
      "properties": {
        "sku_md": {
          "$ref": "#/$defs/product_knowledge"
        }
      }
    },
    "dev.ucp.shopping.catalog.search": {
      "type": "object",
      "properties": {
        "products": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/catalog_product"
          }
        }
      }
    },
    "dev.ucp.shopping.catalog.lookup": {
      "type": "object",
      "properties": {
        "products": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/catalog_product"
          }
        },
        "product": {
          "$ref": "#/$defs/catalog_product"
        }
      }
    }
  }
}
