{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/PostalAddress/v1/schema.json",
  "title": "PostalAddress",
  "description": "Objects Grid PostalAddress Object. Modeled in compliance with https://schema.org/PostalAddress.",
  "type": "object",
  "properties": {
    "at_type": {
      "description": "The object type",
      "anyOf": [
        { "type":"string", "enum":["PostalAddress"] },
        { "type":"null" }
      ]
    },
    "addressCountry": {
      "type": "string",
      "minLength": 2,
      "maxLength": 2
    },
    "addressLocality": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "addressRegion": {
      "type": ["string", "null"],
      "minLength": 0,
      "maxLength": 100
    },
    "extendedAddress": {
      "type": ["string", "null"],
      "minLength": 0,
      "maxLength": 100
    },
    "postOfficeBoxNumber": {
      "type": ["string", "null"],
      "minLength": 0,
      "maxLength": 20
    },
    "postalCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20
    },
    "streetAddress": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "required": ["streetAddress","addressCountry", "postalCode"]
}