{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.peri.com/schemas/rich-results/graph.schema.json",
  "title": "Rich-results @graph contract",
  "description": "Every page embeds a single <script type=\"application/ld+json\"> element whose body is an object with '@context': 'https://schema.org' and a '@graph' array of the node schemas listed below. Nodes are cross-referenced by '@id' instead of being nested: a node that needs to point at another graph member (e.g. WebPage.publisher) only carries '{ \"@id\": \"<url>#<anchor>\" }', and the reader is expected to resolve that '@id' against the other object(s) in the same '@graph' array whose own '@id' ends in the same '#<anchor>'. See the individual schema files for the exact anchor each node type uses (e.g. '#webpage', '#breadcrumb', '#organization', '#website', and the type-specific anchors '#newsarticle' / '#project' / '#product' / event @id).",
  "type": "object",
  "properties": {
    "@context": { "const": "https://schema.org" },
    "@graph": {
      "type": "array",
      "description": "Always contains Breadcrumbs, Organization, Website and WebPage; additionally contains exactly one of Press, Event, Project or Product depending on the page's template.",
      "items": {
        "oneOf": [
          { "$ref": "breadcrumbs.schema.json" },
          { "$ref": "organization.schema.json" },
          { "$ref": "website.schema.json" },
          { "$ref": "webpage.schema.json" },
          { "$ref": "press.schema.json" },
          { "$ref": "event.schema.json" },
          { "$ref": "project.schema.json" },
          { "$ref": "product.schema.json" }
        ]
      }
    }
  },
  "required": ["@context", "@graph"],
  "additionalProperties": false
}
