{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "https://blockprotocol.org/types/modules/graph/0.3/schema/property-type-object",
  "title": "Property Type Object",
  "description": "A JSON object where each entry is constrained by a property type.",
  "type": "object",
  "propertyNames": {
    "$comment": "Property names must be a valid Base URL to a property type",
    "$ref": "https://blockprotocol.org/types/modules/graph/0.3/schema/base-url"
  },
  "patternProperties": {
    ".*": {
      "oneOf": [
        {
          "$ref": "https://blockprotocol.org/types/modules/graph/0.3/schema/property-type-reference"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "array"
            },
            "items": {
              "$comment": "Property object values must be defined through references to the full Versioned URL of the same property type used for the property name.",
              "$ref": "https://blockprotocol.org/types/modules/graph/0.3/schema/property-type-reference"
            },
            "minItems": {
              "type": "integer",
              "minimum": 0
            },
            "maxItems": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": ["type", "items"],
          "additionalProperties": false
        }
      ]
    }
  }
}
