{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "CurrentEmploymentPosition",
  "$id": "current-employment-position",
  "type": "object",
  "definitions": {
    "DID": {
      "type": "string",
      "pattern": "^did:[a-z0-9]+:[A-Za-z0-9._:?=&%;-]+$"
    },
    "MultiLingualString": {
      "type": "object",
      "properties": {
        "localized": {
          "type": "object",
          "propertyNames": {
            "pattern": "^[a-z]{2}(_[A-Z]{2})?$"
          },
          "additionalProperties": {
            "type": "string"
          }
        },
        "preferredLocale": {
          "type": "object",
          "properties": {
            "country": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "language": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            }
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "localized"
      ]
    },
    "Date": {
      "type": "object",
      "properties": {
        "day": {
          "type": "integer",
          "minimum": 1,
          "maximum": 31
        },
        "month": {
          "type": "integer",
          "minimum": 1,
          "maximum": 12
        },
        "year": {
          "type": "integer",
          "minimum": 1950
        }
      },
      "additionalProperties": false
    },
    "Location": {
      "type": "object",
      "properties": {
        "countryCode": {
          "type": "string",
          "pattern": "^[A-Z]{2}$",
          "description": "An uppercase two-letter country code as defined by [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)"
        },
        "regionCode": {
          "type": "string",
          "format": "regex",
          "pattern": "^[A-Za-z0-9]{1,3}$",
          "description": "An uppercase region code as defined by [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)"
        }
      }
    },
    "Alignment": {
      "type": "object",
      "properties": {
        "targetName": {
          "type": "string",
          "description": "CCSS.ELA-Literacy.RST.11-12.3"
        },
        "targetUrl": {
          "type": "string",
          "format": "uri",
          "description": "http://www.corestandards.org/ELA-Literacy/RST/11-12/3"
        },
        "targetDescription": {
          "type": "string",
          "description": "A description of the ELA ltieracy certification."
        },
        "targetCode": {
          "type": "string",
          "description": "CCSS.ELA-Literacy.RST.11-12.3"
        },
        "targetFramework": {
          "type": "string",
          "description": "Mozilla 21st Century Skills"
        }
      },
      "required": [
        "targetName",
        "targetUrl"
      ],
      "additionalProperties": false
    }
  },
  "properties": {
    "company": {
      "$ref": "#/definitions/DID"
    },
    "companyName": {
      "$ref": "#/definitions/MultiLingualString"
    },
    "title": {
      "$ref": "#/definitions/MultiLingualString"
    },
    "description": {
      "$ref": "#/definitions/MultiLingualString"
    },
    "startMonthYear": {
      "$ref": "#/definitions/Date"
    },
    "location": {
      "$ref": "#/definitions/Location"
    },
    "locationName": {
      "$ref": "#/definitions/MultiLingualString"
    },
    "alignment": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Alignment"
      }
    }
  },
  "required": [
    "company",
    "companyName",
    "title",
    "startMonthYear"
  ]
}