{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://voltdb.com/voltsp/schemas/source/http",
  "title" : "Http Source Configuration",
  "description" : "The `http` listens for incoming connections, accepting HTTP/1.1 POST requests and processing them accordingly.\n\nThe source emits the decoded request body. The whitelisted request headers are\nwritten to the stage-scoped {@link org.voltdb.stream.api.StashContext} when the\n`headers` field is configured with at least one entry; an empty/unset `headers`\nfield means no headers are deserialised or stashed.\n\nAvailable stash entries:\n\n| Entry   | Java (typed key)        | YAML / JS / Python (name) | Runtime type          |\n|---------|-------------------------|---------------------------|-----------------------|\n| Headers | `HttpStashKeys.HEADERS` | `source.http.headers`     | `Map<String, String>` |\n",
  "type" : "object",
  "properties" : {
    "http" : {
      "type" : "object",
      "properties" : {
        "address" : {
          "type" : "string",
          "description" : "If no address is provided, the server defaults to 0.0.0.0, which binds it to all available\n network interfaces.\n",
          "default" : "0.0.0.0",
          "anyOf" : [ {
            "type" : "string",
            "format" : "hostname"
          }, {
            "type" : "string",
            "format" : "ipv4"
          }, {
            "type" : "string",
            "format" : "ipv6"
          } ]
        },
        "decoder" : {
          "type" : "string",
          "description" : "Decoder applied to incoming data. Converts input into a usable format.\nFor built-in decoder implementations, see `org.voltdb.stream.api.network.Decoders`.\n",
          "enum" : [ "none", "identity", "lines", "bytes", "chars" ]
        },
        "path" : {
          "type" : "string",
          "description" : "The URI path on which the HTTP server listens for incoming requests.\nFor example, '/' for the root context, or '/basket' for a specific subpath.\n",
          "default" : "/"
        },
        "headers" : {
          "description" : "A set of header names to extract from the HTTP request and write to the\nstash context. Leave empty (the default) to skip header deserialisation.\n",
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "array",
            "description" : "A set of header names to extract from the HTTP request and write to the\nstash context. Leave empty (the default) to skip header deserialisation.\n",
            "uniqueItems" : true,
            "items" : {
              "type" : "string"
            }
          } ]
        },
        "maxContentSize" : {
          "type" : "integer",
          "description" : "Specifies the maximum size (in bytes) of incoming content that the server will accept.\nThe default limit is 1 MB to prevent excessive memory usage.\n",
          "default" : "1048576",
          "minimum" : -2147483648,
          "maximum" : 2147483647
        },
        "expectedContentTypes" : {
          "description" : "List of accepted content types. Defaults to accepting any type if not specified.\n",
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "array",
            "description" : "List of accepted content types. Defaults to accepting any type if not specified.\n",
            "uniqueItems" : true,
            "items" : {
              "type" : "string"
            }
          } ]
        },
        "readIdleTimeout" : {
          "type" : "string",
          "pattern" : "^(\\d+[smhd]|P(T|\\d+[YMD]).*)",
          "description" : "Read idle timeout. Closes the connection if no inbound data is received.\n",
          "default" : "PT1M"
        },
        "exceptionHandler" : {
          "type" : "string",
          "description" : "Custom exception handler enabling interception of all errors related to this source.\n"
        },
        "ssl" : {
          "type" : "object",
          "description" : "Secure transport configuration.",
          "properties" : {
            "trustStoreFile" : {
              "type" : "string",
              "description" : "Truststore file or trusted CA certificate; supported formats include JKS, PKCS#12, or PEM."
            },
            "trustStorePassword" : {
              "type" : "string",
              "description" : "Truststore password."
            },
            "keyStoreFile" : {
              "type" : "string",
              "description" : "Keystore file; supported formats include JKS, PKCS#12, or PEM"
            },
            "keyStorePassword" : {
              "type" : "string",
              "description" : "Keystore password."
            },
            "keyPassword" : {
              "type" : "string",
              "description" : "Private key password. Optional — if not set, the key store password will be used."
            },
            "insecure" : {
              "type" : "boolean",
              "description" : "If set to true, disables SSL certificate and hostname validation.\nIntended for debugging purposes only. Doesn't work with mTLS.\n"
            },
            "hostnameVerifier" : {
              "type" : "string",
              "description" : "Custom hostname verifier for SSL connections.\nIf not specified and 'insecure' is true, hostname verification will be disabled.\n"
            }
          },
          "additionalProperties" : false
        },
        "socketOptions" : {
          "type" : "object",
          "description" : "Configures operating system options to be applied to the server socket.\nSupported values are:\n  - `SO_SNDBUF`,\n  - `SO_RCVBUF`,\n  - `SO_TIMEOUT`,\n  - `SO_KEEPALIVE`,\n  - `SO_LINGER`,\n  - `SO_BACKLOG`,\n  - `TCP_NODELAY`.\n",
          "additionalProperties" : {
            "type" : "string"
          }
        }
      },
      "required" : [ "address", "decoder" ],
      "additionalProperties" : false
    }
  },
  "required" : [ "http" ],
  "additionalProperties" : false
}
