{
"$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Issuer Accreditation",
  "description": "This extension provides a reference to a single or to an array of multiple accreditation bodies as related to the Issuer Profile.",
  "type": "object",
  "definitions": {
    "ISODate": {
      "description": "ISO 8601 date format string YYYY-MM-DD or YYYYMMDD",
      "type": "string",
      "pattern": "^([0-9]{4})(-?)(1[0-2]|0[1-9])\\2(3[01]|0[1-9]|[12][0-9])$"
    }
  },
  "properties": {
    "name": {"type": "string"},
    "contactInstructions": {"type": "string"},
    "url": {
      "type": "string",
      "format": "uri"
    },
    "description": {"type": "string"},
    "address": {
      "type": "object",
      "properties": {
        "streetAddress": {"type": "string"},
        "addressLocality": {"type": "string"},
        "addressRegion": {"type": "string"},
        "postalCode": {"type": "string"}
      }
    },
    "logo": {
      "type": "string",
      "format": "uri"
    },
    "parentOrganization": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "url": {
          "type": "string",
          "format": "uri"
        },
        "address": {
          "type": "object",
          "properties": {
            "streetAddress": {"type": "string"},
            "addressLocality": {"type": "string"},
            "addressRegion": {"type": "string"},
            "postalCode": {"type": "string"}
          }
        }
      }
    },
    "areaServed": {"type": "string"},
    "accreditationDate": {
      "$ref": "#/definitions/ISODate"
    },
    "educationalSector": {"type": "string"}
  },
  "required": ["name","contactInstructions","url","address"]

}