{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://imde.io/schema/azlon/1.0/foodallergens/foodallergens.json",
  "title": "DataTopic_FoodAllergens",
  "$comment": "Source XSD: https://imde.io/schema/azlon/1.0/foodallergens/foodallergens.xsd",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "Regulation": {
      "$ref": "https://imde.io/schema/azlon/1.0/codelists/regulationType.json"
    },
    "Allergens": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Allergen": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "Codes": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "$ref": "https://imde.io/schema/azlon/1.0/codelists/allergenCodeType.json"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "Type": {
                "$ref": "https://imde.io/schema/azlon/1.0/codelists/allergenType.json"
              },
              "OnLabel": {
                "type": "boolean"
              }
            },
            "required": [
              "Codes",
              "Type"
            ]
          },
          "minItems": 1
        }
      },
      "required": [
        "Allergen"
      ]
    }
  },
  "required": [
    "Regulation",
    "Allergens"
  ]
}
