const std::string Json::Schema::ACCESS_LOG_SCHEMA()

in source/common/json/config_schemas.cc [6:129]


const std::string Json::Schema::ACCESS_LOG_SCHEMA(R"EOF(
  {
    "$schema": "http://json-schema.org/schema#",
    "definitions": {
      "status_code" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : ["status_code"]
          },
          "op" : {
            "type" : "string",
            "enum" : [">=", "="]
          },
          "value" : {
            "type" : "integer",
            "minimum" : 0,
            "maximum" : 599
          },
          "runtime_key" : {"type" : "string"}
        },
        "required" : ["type", "op", "value"],
        "additionalProperties" : false
      },
      "duration" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : ["duration"]
          },
          "op" : {
            "type" : "string",
            "enum" : [">=", "="]
          },
          "value" : {
            "type" : "integer",
            "minimum" : 0
          },
          "runtime_key" : {"type" : "string"}
        },
        "required" : ["type", "op", "value"],
        "additionalProperties" : false
      },
      "not_healthcheck" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : ["not_healthcheck"]
          }
        },
        "required" : ["type"],
        "additionalProperties" : false
      },
      "traceable_request" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : ["traceable_request"]
          }
        },
        "required" : ["type"],
        "additionalProperties" : false
      },
      "runtime" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : ["runtime"]
          },
          "key" : {"type" : "string"}
        },
        "required" : ["type", "key"],
        "additionalProperties" : false
      },
      "logical_filter" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : ["logical_and", "logical_or"]
          },
          "filters" : {
            "type" : "array",
            "minItems" : 2,
            "items" : {
              "oneOf" : [
                {"$ref" : "#/definitions/status_code"},
                {"$ref" : "#/definitions/duration"},
                {"$ref" : "#/definitions/not_healthcheck"},
                {"$ref" : "#/definitions/logical_filter"},
                {"$ref" : "#/definitions/traceable_request"},
                {"$ref" : "#/definitions/runtime"}
              ]
            }
          }
        },
        "required" : ["type", "filters"],
        "additionalProperties" : false
      }
    },
    "type" : "object",
    "properties" : {
      "path" : {"type" : "string"},
      "format" : {"type" : "string"},
      "filter" : {
        "type" : "object",
        "oneOf" : [
          {"$ref" : "#/definitions/not_healthcheck"},
          {"$ref" : "#/definitions/status_code"},
          {"$ref" : "#/definitions/duration"},
          {"$ref" : "#/definitions/traceable_request"},
          {"$ref" : "#/definitions/runtime"},
          {"$ref" : "#/definitions/logical_filter"}
        ]
      }
    },
    "required" : ["path"],
    "additionalProperties" : false
  }