{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.peri.com/schemas/rich-results/webpage.schema.json",
  "title": "WebPage rich-results contract",
  "description": "Structure guaranteed for the schema.org WebPage node.",
  "type": "object",
  "$defs": {
    "idRef": {
      "type": "object",
      "properties": {
        "@id": { "type": "string", "minLength": 1 }
      },
      "required": ["@id"],
      "additionalProperties": false
    }
  },
  "properties": {
    "@type": { "const": "WebPage" },
    "@id": { "type": "string", "minLength": 1, "pattern": "#webpage$" },
    "url": { "type": "string", "minLength": 1 },
    "name": { "type": "string" },
    "description": { "type": "string" },
    "inLanguage": { "type": "string", "minLength": 1 },
    "isPartOf": { "$ref": "#/$defs/idRef" },
    "breadcrumb": { "$ref": "#/$defs/idRef" },
    "mainEntity": { "$ref": "#/$defs/idRef" },
    "about": { "$ref": "#/$defs/idRef" },
    "publisher": { "$ref": "#/$defs/idRef" }
  },
  "required": ["@type", "@id", "url", "inLanguage", "isPartOf", "breadcrumb", "publisher"],
  "additionalProperties": false
}
