{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "PackagesResponse",
  "type": "object",
  "properties": {
    "packages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "IdentifierObject": {
            "type": "object",
            "properties": {
              "IdentifierType": {
                "type": "string",
                "enum": ["Local"]  // Adjust enum if other types are allowed
              },
              "IdentifierString": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": ["IdentifierType", "IdentifierString"]
          },
          "archiveName": {
            "type": "string"
          },
          "archiveDescription": {
            "type": "string"
          },
          "archiveURL": {
            "type": "string"
          }
        },
        "required": ["IdentifierObject", "archiveName", "archiveDescription", "archiveURL"]
      }
    },
    "totalEntries": {
      "type": "integer",
      "minimum": 0
    },
    "page": {
      "type": "integer",
      "minimum": 0
    },
    "size": {
      "type": "integer",
      "minimum": 1
    },
    "sortBy": {
      "type": "string"
    },
    "sortDir": {
      "type": "string",
      "enum": ["asc", "desc"]
    },
    "query": {
      "type": "string"
    }
  },
  "required": ["packages", "totalEntries", "page", "size", "sortBy", "sortDir", "query"]
}
