{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "azlon/1.0/technicaldossier.json",
  "type": "object",
  "required": [ "Document" ],
  "properties": {
    "Document": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Document"
      }
    }
  },
  "$defs": {
    "Document": {
      "type": "object",
      "required": [ "DocumentCode", "DocumentType", "ComplianceIndicators", "AppliesTo", "Url" ],
      "properties": {
        "DocumentCode": {
          "type": "string"
        },
        "DocumentType": {
          "type": "object",
          "properties": {
            "CodeList": {
              "type": "string"
            },
            "Value": {
              "type": "string"
            }
          },
          "required": [ "CodeList", "Value" ]
        },
        "IssueDate": {
          "type": "string",
          "format": "date-time"
        },
        "ComplianceIndicators": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ComplianceIndicator"
          }
        },
        "AppliesTo": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "UniqueIdentifier": {
                "type": "string",
                "format": "uuid"
              },
              "PackagingType": {
                "type": "object",
                "properties": {
                  "CodeList": {
                    "type": "string"
                  },
                  "Value": {
                    "type": "string"
                  }
                },
                "required": [ "CodeList", "Value" ]
              }
            },
            "required": [ "UniqueIdentifier", "PackagingType" ]
          }
        },
        "Url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "ComplianceIndicator": {
      "type": "object",
      "required": [ "CodeList", "Value" ],
      "properties": {
        "CodeList": {
          "type": "string"
        },
        "Value": {
          "type": "string"
        }
      }
    },
    "Item": {
      "type": "object",
      "required": [ "UniqueIdentifier", "PackagingType" ],
      "properties": {
        "UniqueIdentifier": {
          "type": "string"
        },
        "PackagingType": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "Value": {
              "type": "string"
            },
            "Type": {
              "type": "string"
            }
          },
          "required": [
            "Value",
            "Type"
          ]
        }
      }
    }
  }
}
