{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://leohan.me/profile.schema.json",
  "title": "Leo Han public digital identity profile",
  "type": "object",
  "required": [
    "$schema",
    "name",
    "identity",
    "metadata",
    "interpretation",
    "personalProfile",
    "education",
    "projects",
    "updated",
    "draft"
  ],
  "properties": {
    "$schema": {
      "const": "https://leohan.me/profile.schema.json"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "tagline": {
      "type": "string"
    },
    "headline": {
      "type": "string"
    },
    "intro": {
      "type": "string"
    },
    "about": {
      "type": "string"
    },
    "aboutFull": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "interests": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "identity": {
      "type": "object",
      "required": [
        "id",
        "type",
        "displayName",
        "website",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "const": "Person"
        },
        "displayName": {
          "type": "string",
          "minLength": 1
        },
        "website": {
          "type": "string",
          "format": "uri"
        },
        "status": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "metadata": {
      "type": "object",
      "required": [
        "schemaVersion",
        "profileVersion",
        "lastUpdated",
        "publicationStatus",
        "provenance",
        "canonicalSource",
        "formats",
        "versioning"
      ],
      "properties": {
        "schemaVersion": {
          "const": "1.0.0"
        },
        "profileVersion": {
          "type": "string",
          "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
        },
        "lastUpdated": {
          "type": "string",
          "format": "date"
        },
        "publicationStatus": {
          "enum": [
            "draft",
            "published"
          ]
        },
        "provenance": {
          "type": "string"
        },
        "canonicalSource": {
          "type": "string",
          "format": "uri"
        },
        "formats": {
          "type": "object",
          "required": [
            "html",
            "markdown",
            "json",
            "jsonLd",
            "schema",
            "discovery"
          ],
          "additionalProperties": {
            "type": "string",
            "format": "uri"
          }
        },
        "versioning": {
          "type": "string"
        }
      }
    },
    "interpretation": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "personalProfile": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "education": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "date",
          "status",
          "programmes"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "campus": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "startYear": {
            "type": "integer"
          },
          "expectedGraduationYear": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "programmes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "subjects": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "type",
          "description"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "participants": {
            "type": "integer",
            "minimum": 0
          },
          "regressionPredictors": {
            "type": "integer",
            "minimum": 0
          },
          "methodology": {
            "type": "string"
          },
          "findings": {
            "type": "string"
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availability": {
            "type": "string"
          }
        }
      }
    },
    "experience": {
      "type": "array"
    },
    "skills": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "links": {
      "type": "array"
    },
    "updated": {
      "type": "string",
      "format": "date"
    },
    "draft": {
      "type": "boolean"
    }
  },
  "additionalProperties": true
}
