{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.peri.com/schemas/rich-results/project.schema.json",
  "title": "Project rich-results contract",
  "description": "Structure guaranteed for the schema.org Project node.",
  "type": "object",
  "properties": {
    "@type": { "const": "Project" },
    "@id": { "type": "string", "minLength": 1, "pattern": "#project$" },
    "name": { "type": "string", "minLength": 1 },
    "mainEntityOfPage": {
      "type": "object",
      "properties": { "@id": { "type": "string", "minLength": 1 } },
      "required": ["@id"],
      "additionalProperties": false
    },
    "additionalProperty": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@type": { "const": "PropertyValue" },
          "name": { "type": "string", "minLength": 1 },
          "value": { "type": "string", "minLength": 1 }
        },
        "required": ["@type", "name", "value"],
        "additionalProperties": false
      }
    },
    "location": {
      "type": "object",
      "properties": {
        "@type": { "const": "Place" },
        "name": { "type": "string" },
        "address": {
          "type": "object",
          "properties": {
            "@type": { "const": "PostalAddress" },
            "streetAddress": { "type": "string" },
            "addressLocality": { "type": "string" },
            "postalCode": { "type": "string" },
            "addressCountry": { "type": "string", "minLength": 1 }
          },
          "required": ["@type", "addressCountry"],
          "additionalProperties": false
        }
      },
      "required": ["@type", "address"],
      "additionalProperties": false
    },
    "description": { "type": "string" }
  },
  "required": ["@type", "@id", "name", "mainEntityOfPage", "description"],
  "additionalProperties": false
}
