{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://heartcortex.ai/schemas/1.0/batch-request.schema.json",
  "title": "Batch",
  "type": "object",
  "required": [
    "requests"
  ],
  "properties": {
    "requests": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "required": [
          "method",
          "path"
        ],
        "properties": {
          "method": {
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ]
          },
          "path": {
            "type": "string",
            "pattern": "^/"
          },
          "body": {},
          "id": {
            "type": "string"
          }
        }
      }
    },
    "stopOnError": {
      "type": "boolean"
    }
  }
}
