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

in source/common/json/config_schemas.cc [636:782]


const std::string Json::Schema::ROUTE_ENTRY_CONFIGURATION_SCHEMA(R"EOF(
  {
    "$schema": "http://json-schema.org/schema#",
    "definitions" : {
      "weighted_clusters" : {
        "type" : "object",
        "minItems": 1,
        "properties" : {
          "clusters" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "name" : {"type" : "string"},
                "weight" : {"type" : "integer"}
              },
              "required" : ["name", "weight"],
              "additionalProperties" : false
            }
          },
          "runtime_key_prefix" : {"type" : "string"}
        },
        "additionalProperties" : false
      }
    },
    "type" : "object",
    "properties" : {
      "prefix" : {"type" : "string"},
      "path" : {"type" : "string"},
      "regex" : {"type" : "string"},
      "cluster" : {"type" : "string"},
      "cluster_header" : {"type" : "string"},
      "weighted_clusters": {"$ref" : "#/definitions/weighted_clusters"},
      "host_redirect" : {"type" : "string"},
      "path_redirect" : {"type" : "string"},
      "prefix_rewrite" : {"type" : "string"},
      "host_rewrite" : {"type" : "string"},
      "auto_host_rewrite" : {"type" : "boolean"},
      "case_sensitive" : {"type" : "boolean"},
      "timeout_ms" : {"type" : "integer"},
      "runtime" : {
        "type" : "object",
        "properties" : {
          "key": {"type" : "string"},
          "default" : {"type" : "integer"}
        },
        "required" : ["key", "default"],
        "additionalProperties" : false
      },
      "retry_policy" : {
        "type" : "object",
        "properties" : {
          "per_try_timeout_ms" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "num_retries" : {"type" : "integer"},
          "retry_on" : {"type" : "string"}
        },
        "required" : ["retry_on"],
        "additionalProperties" : false
      },
      "shadow" : {
        "type" : "object",
        "properties" : {
          "cluster" : {"type" : "string"},
          "runtime_key" : {"type": "string"}
        },
        "required" : ["cluster"],
        "additionalProperties" : false
      },
      "priority" : {
        "type" : "string",
        "enum" : ["default", "high"]
      },
      "headers" : {
        "type" : "array",
        "minItems" : 1,
        "items" : {
          "type" : "object"
        }
      },
      "query_parameters": {
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "object"
        }
      },
      "rate_limits" : {"type" : "array"},
      "include_vh_rate_limits" : {"type" : "boolean"},
      "hash_policy" : {
        "type" : "object",
        "properties" : {
          "header_name" : {"type" : "string"}
        },
        "required" : ["header_name"],
        "additionalProperties" : false
      },
      "request_headers_to_add" : {
        "type" : "array",
        "minItems" : 1,
        "uniqueItems" : true,
        "items" : {
          "type": "object",
          "properties": {
            "key" : {"type" : "string"},
            "value" : {"type" : "string"}
          },
          "required": ["key", "value"],
          "additionalProperties": false
        }
      },
      "opaque_config" : {
        "type" : "object",
        "additionalProperties" : true
      },
      "decorator" : {
        "type" : "object",
        "properties" : {
          "operation" : {"type" : "string"}
        },
        "required" : ["operation"],
        "additionalProperties" : false
      },
      "cors" : {
        "type" : "object",
        "properties" : {
          "allow_origin": {
            "type" : "array",
            "items" : {
              "type" : "string"
          }},
          "allow_methods" : {"type" : "string"},
          "allow_headers" : {"type" : "string"},
          "expose_headers" : {"type" : "string"},
          "max_age" : {"type" : "string"},
          "allow_credentials" : {"type" : "boolean"},
          "enabled" : {"type" : "boolean"}
        },
        "required" : [],
        "additionalProperties" : false
      }
    },
    "additionalProperties" : false
  }