{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "azlon/1.1/declarationofconformity.json",
  "type": "object",
  "required": [ "KeyInfo", "Urls" ],
  "properties": {
    "KeyInfo": {
      "$ref": "#/$defs/KeyInfo"
    },
    "Urls": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UrlItem"
      },
      "minItems": 1
    }
  },
  "$defs": {
    "KeyInfo": {
      "type": "object",
      "required": [ "DocumentNumber", "Status", "Revision", "IssueDate", "Manufacturer" ],
      "properties": {
        "DocumentNumber": {
          "type": "string",
          "description": "Document number"
        },
        "Revision": {
          "type": "string",
          "description": "Document revision"
        },
        "Status": {
          "$ref": "https://imde.io/schema/azlon/1.0/codelists/declarationOfConformityStatus.json"
        },
        "IssueDate": {
          "type": "string",
          "format": "date-time"
        },
        "SignedOnDate": {
          "type": "string",
          "format": "date-time"
        },
        "SignedBy": {
          "type": "string",
          "description": "Name of person who signed"
        },
        "SignedByTitle": {
          "type": "string",
          "description": "Title of person who signed"
        },
        "Manufacturer": {
          "type": "string",
          "description": "Name of manufacturer"
        }
      }
    },
    "UrlItem": {
      "type": "object",
      "required": [ "Language", "Url" ],
      "properties": {
        "Language": {
          "type": "string",
          "description": "Language code (e.g., en, de, nl)"
        },
        "Url": {
          "type": "string",
          "format": "uri",
          "description": "URL to the document"
        }
      }
    }
  }
}
