blob: 37f7c485e64ae7a813269ec5e79c7ff0b12eef3e [file] [log] [blame]
{
"main": {
"consumer": {
"properties": {
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"plugins": {
"type": "object"
},
"update_time": {
"type": "integer"
},
"username": {
"maxLength": 100,
"minLength": 1,
"pattern": "^[a-zA-Z0-9_]+$",
"type": "string"
}
},
"required": [
"username"
],
"type": "object"
},
"global_rule": {
"properties": {
"create_time": {
"type": "integer"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"plugins": {
"type": "object"
},
"update_time": {
"type": "integer"
}
},
"required": [
"plugins"
],
"type": "object"
},
"plugin_config": {
"properties": {
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"plugins": {
"type": "object"
},
"update_time": {
"type": "integer"
}
},
"required": [
"id",
"plugins"
],
"type": "object"
},
"plugins": {
"items": {
"properties": {
"name": {
"minLength": 1,
"type": "string"
},
"stream": {
"type": "boolean"
}
},
"required": [
"name"
],
"type": "object"
},
"type": "array"
},
"proto": {
"properties": {
"content": {
"maxLength": 1048576,
"minLength": 1,
"type": "string"
},
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"update_time": {
"type": "integer"
}
},
"required": [
"content"
],
"type": "object"
},
"route": {
"allOf": [
{
"oneOf": [
{
"required": [
"uri"
]
},
{
"required": [
"uris"
]
}
]
},
{
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"host"
]
},
{
"required": [
"hosts"
]
}
]
}
},
{
"required": [
"host"
]
},
{
"required": [
"hosts"
]
}
]
},
{
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"remote_addr"
]
},
{
"required": [
"remote_addrs"
]
}
]
}
},
{
"required": [
"remote_addr"
]
},
{
"required": [
"remote_addrs"
]
}
]
}
],
"anyOf": [
{
"required": [
"plugins",
"uri"
]
},
{
"required": [
"upstream",
"uri"
]
},
{
"required": [
"upstream_id",
"uri"
]
},
{
"required": [
"service_id",
"uri"
]
},
{
"required": [
"plugins",
"uris"
]
},
{
"required": [
"upstream",
"uris"
]
},
{
"required": [
"upstream_id",
"uris"
]
},
{
"required": [
"service_id",
"uris"
]
},
{
"required": [
"script",
"uri"
]
},
{
"required": [
"script",
"uris"
]
}
],
"not": {
"anyOf": [
{
"required": [
"plugins",
"script"
]
},
{
"required": [
"plugin_config_id",
"script"
]
}
]
},
"properties": {
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"enable_websocket": {
"description": "enable websocket for request",
"type": "boolean"
},
"filter_func": {
"minLength": 10,
"pattern": "^function",
"type": "string"
},
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"hosts": {
"items": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"methods": {
"items": {
"description": "HTTP method",
"enum": [
"CONNECT",
"DELETE",
"GET",
"HEAD",
"OPTIONS",
"PATCH",
"POST",
"PUT",
"TRACE"
],
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"plugin_config_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"plugins": {
"type": "object"
},
"priority": {
"default": 0,
"type": "integer"
},
"remote_addr": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
],
"description": "client IP",
"type": "string"
},
"remote_addrs": {
"items": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
],
"description": "client IP",
"type": "string"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"script": {
"maxLength": 102400,
"minLength": 10,
"type": "string"
},
"script_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"service_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"service_protocol": {
"enum": [
"grpc",
"http"
]
},
"status": {
"default": 1,
"description": "route status, 1 to enable, 0 to disable",
"enum": [
0,
1
],
"type": "integer"
},
"timeout": {
"properties": {
"connect": {
"exclusiveMinimum": 0,
"type": "number"
},
"read": {
"exclusiveMinimum": 0,
"type": "number"
},
"send": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"connect",
"read",
"send"
],
"type": "object"
},
"update_time": {
"type": "integer"
},
"upstream": {
"oneOf": [
{
"required": [
"nodes",
"type"
]
},
{
"required": [
"discovery_type",
"service_name",
"type"
]
}
],
"properties": {
"checks": {
"anyOf": [
{
"required": [
"active"
]
},
{
"required": [
"active",
"passive"
]
}
],
"properties": {
"active": {
"properties": {
"concurrency": {
"default": 10,
"type": "integer"
},
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
302
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"successes": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"http_path": {
"default": "/",
"type": "string"
},
"https_verify_certificate": {
"default": true,
"type": "boolean"
},
"port": {
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"req_headers": {
"items": {
"type": "string",
"uniqueItems": true
},
"minItems": 1,
"type": "array"
},
"timeout": {
"default": 1,
"type": "number"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
404,
429,
500,
501,
502,
503,
504,
505
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 3,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"passive": {
"properties": {
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"successes": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
429,
500,
503
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
},
"hash_on": {
"default": "vars",
"enum": [
"consumer",
"cookie",
"header",
"vars",
"vars_combinations"
],
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"keepalive_pool": {
"properties": {
"idle_timeout": {
"default": 60,
"minimum": 0,
"type": "number"
},
"requests": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"size": {
"default": 320,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"key": {
"description": "the key of chash for dynamic load balancing",
"type": "string"
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"nodes": {
"anyOf": [
{
"patternProperties": {
".*": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
{
"items": {
"properties": {
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"metadata": {
"description": "metadata of node",
"type": "object"
},
"port": {
"description": "port of node",
"minimum": 1,
"type": "integer"
},
"priority": {
"default": 0,
"description": "priority of node",
"type": "integer"
},
"weight": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"required": [
"host",
"port",
"weight"
],
"type": "object"
},
"type": "array"
}
]
},
"pass_host": {
"default": "pass",
"description": "mod of host passing",
"enum": [
"node",
"pass",
"rewrite"
],
"type": "string"
},
"retries": {
"minimum": 0,
"type": "integer"
},
"retry_timeout": {
"minimum": 0,
"type": "number"
},
"scheme": {
"default": "http",
"enum": [
"grpc",
"grpcs",
"http",
"https"
]
},
"service_name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"timeout": {
"properties": {
"connect": {
"exclusiveMinimum": 0,
"type": "number"
},
"read": {
"exclusiveMinimum": 0,
"type": "number"
},
"send": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"connect",
"read",
"send"
],
"type": "object"
},
"tls": {
"properties": {
"client_cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"client_key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
}
},
"required": [
"client_cert",
"client_key"
],
"type": "object"
},
"type": {
"description": "algorithms of load balancing",
"type": "string"
},
"update_time": {
"type": "integer"
},
"upstream_host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
}
},
"type": "object"
},
"upstream_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"uri": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
},
"uris": {
"items": {
"description": "HTTP uri",
"type": "string"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"vars": {
"type": "array"
}
},
"type": "object"
},
"service": {
"properties": {
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"enable_websocket": {
"description": "enable websocket for request",
"type": "boolean"
},
"hosts": {
"items": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"plugins": {
"type": "object"
},
"script": {
"maxLength": 102400,
"minLength": 10,
"type": "string"
},
"update_time": {
"type": "integer"
},
"upstream": {
"oneOf": [
{
"required": [
"nodes",
"type"
]
},
{
"required": [
"discovery_type",
"service_name",
"type"
]
}
],
"properties": {
"checks": {
"anyOf": [
{
"required": [
"active"
]
},
{
"required": [
"active",
"passive"
]
}
],
"properties": {
"active": {
"properties": {
"concurrency": {
"default": 10,
"type": "integer"
},
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
302
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"successes": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"http_path": {
"default": "/",
"type": "string"
},
"https_verify_certificate": {
"default": true,
"type": "boolean"
},
"port": {
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"req_headers": {
"items": {
"type": "string",
"uniqueItems": true
},
"minItems": 1,
"type": "array"
},
"timeout": {
"default": 1,
"type": "number"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
404,
429,
500,
501,
502,
503,
504,
505
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 3,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"passive": {
"properties": {
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"successes": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
429,
500,
503
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
},
"hash_on": {
"default": "vars",
"enum": [
"consumer",
"cookie",
"header",
"vars",
"vars_combinations"
],
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"keepalive_pool": {
"properties": {
"idle_timeout": {
"default": 60,
"minimum": 0,
"type": "number"
},
"requests": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"size": {
"default": 320,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"key": {
"description": "the key of chash for dynamic load balancing",
"type": "string"
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"nodes": {
"anyOf": [
{
"patternProperties": {
".*": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
{
"items": {
"properties": {
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"metadata": {
"description": "metadata of node",
"type": "object"
},
"port": {
"description": "port of node",
"minimum": 1,
"type": "integer"
},
"priority": {
"default": 0,
"description": "priority of node",
"type": "integer"
},
"weight": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"required": [
"host",
"port",
"weight"
],
"type": "object"
},
"type": "array"
}
]
},
"pass_host": {
"default": "pass",
"description": "mod of host passing",
"enum": [
"node",
"pass",
"rewrite"
],
"type": "string"
},
"retries": {
"minimum": 0,
"type": "integer"
},
"retry_timeout": {
"minimum": 0,
"type": "number"
},
"scheme": {
"default": "http",
"enum": [
"grpc",
"grpcs",
"http",
"https"
]
},
"service_name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"timeout": {
"properties": {
"connect": {
"exclusiveMinimum": 0,
"type": "number"
},
"read": {
"exclusiveMinimum": 0,
"type": "number"
},
"send": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"connect",
"read",
"send"
],
"type": "object"
},
"tls": {
"properties": {
"client_cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"client_key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
}
},
"required": [
"client_cert",
"client_key"
],
"type": "object"
},
"type": {
"description": "algorithms of load balancing",
"type": "string"
},
"update_time": {
"type": "integer"
},
"upstream_host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
}
},
"type": "object"
},
"upstream_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
}
},
"type": "object"
},
"ssl": {
"oneOf": [
{
"required": [
"cert",
"key",
"sni"
]
},
{
"required": [
"cert",
"key",
"snis"
]
}
],
"properties": {
"cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"certs": {
"items": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"type": "array"
},
"client": {
"properties": {
"ca": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"depth": {
"default": 1,
"minimum": 0,
"type": "integer"
}
},
"required": [
"ca"
],
"type": "object"
},
"create_time": {
"type": "integer"
},
"exptime": {
"minimum": 1588262400,
"type": "integer"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"keys": {
"items": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"type": "array"
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"sni": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"snis": {
"items": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"minItems": 1,
"type": "array"
},
"status": {
"default": 1,
"description": "ssl status, 1 to enable, 0 to disable",
"enum": [
0,
1
],
"type": "integer"
},
"update_time": {
"type": "integer"
},
"validity_end": {
"type": "integer"
},
"validity_start": {
"type": "integer"
}
},
"type": "object"
},
"stream_route": {
"properties": {
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"plugins": {
"type": "object"
},
"remote_addr": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
],
"description": "client IP",
"type": "string"
},
"server_addr": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
],
"description": "server IP",
"type": "string"
},
"server_port": {
"description": "server port",
"type": "integer"
},
"sni": {
"description": "server name indication",
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"update_time": {
"type": "integer"
},
"upstream": {
"oneOf": [
{
"required": [
"nodes",
"type"
]
},
{
"required": [
"discovery_type",
"service_name",
"type"
]
}
],
"properties": {
"checks": {
"anyOf": [
{
"required": [
"active"
]
},
{
"required": [
"active",
"passive"
]
}
],
"properties": {
"active": {
"properties": {
"concurrency": {
"default": 10,
"type": "integer"
},
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
302
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"successes": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"http_path": {
"default": "/",
"type": "string"
},
"https_verify_certificate": {
"default": true,
"type": "boolean"
},
"port": {
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"req_headers": {
"items": {
"type": "string",
"uniqueItems": true
},
"minItems": 1,
"type": "array"
},
"timeout": {
"default": 1,
"type": "number"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
404,
429,
500,
501,
502,
503,
504,
505
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 3,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"passive": {
"properties": {
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"successes": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
429,
500,
503
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
},
"hash_on": {
"default": "vars",
"enum": [
"consumer",
"cookie",
"header",
"vars",
"vars_combinations"
],
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"keepalive_pool": {
"properties": {
"idle_timeout": {
"default": 60,
"minimum": 0,
"type": "number"
},
"requests": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"size": {
"default": 320,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"key": {
"description": "the key of chash for dynamic load balancing",
"type": "string"
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"nodes": {
"anyOf": [
{
"patternProperties": {
".*": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
{
"items": {
"properties": {
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"metadata": {
"description": "metadata of node",
"type": "object"
},
"port": {
"description": "port of node",
"minimum": 1,
"type": "integer"
},
"priority": {
"default": 0,
"description": "priority of node",
"type": "integer"
},
"weight": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"required": [
"host",
"port",
"weight"
],
"type": "object"
},
"type": "array"
}
]
},
"pass_host": {
"default": "pass",
"description": "mod of host passing",
"enum": [
"node",
"pass",
"rewrite"
],
"type": "string"
},
"retries": {
"minimum": 0,
"type": "integer"
},
"retry_timeout": {
"minimum": 0,
"type": "number"
},
"scheme": {
"default": "http",
"enum": [
"grpc",
"grpcs",
"http",
"https"
]
},
"service_name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"timeout": {
"properties": {
"connect": {
"exclusiveMinimum": 0,
"type": "number"
},
"read": {
"exclusiveMinimum": 0,
"type": "number"
},
"send": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"connect",
"read",
"send"
],
"type": "object"
},
"tls": {
"properties": {
"client_cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"client_key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
}
},
"required": [
"client_cert",
"client_key"
],
"type": "object"
},
"type": {
"description": "algorithms of load balancing",
"type": "string"
},
"update_time": {
"type": "integer"
},
"upstream_host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
}
},
"type": "object"
},
"upstream_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
}
},
"type": "object"
},
"upstream": {
"oneOf": [
{
"required": [
"nodes",
"type"
]
},
{
"required": [
"discovery_type",
"service_name",
"type"
]
}
],
"properties": {
"checks": {
"anyOf": [
{
"required": [
"active"
]
},
{
"required": [
"active",
"passive"
]
}
],
"properties": {
"active": {
"properties": {
"concurrency": {
"default": 10,
"type": "integer"
},
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
302
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"successes": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"http_path": {
"default": "/",
"type": "string"
},
"https_verify_certificate": {
"default": true,
"type": "boolean"
},
"port": {
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"req_headers": {
"items": {
"type": "string",
"uniqueItems": true
},
"minItems": 1,
"type": "array"
},
"timeout": {
"default": 1,
"type": "number"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
404,
429,
500,
501,
502,
503,
504,
505
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 3,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"passive": {
"properties": {
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"successes": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
429,
500,
503
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
},
"hash_on": {
"default": "vars",
"enum": [
"consumer",
"cookie",
"header",
"vars",
"vars_combinations"
],
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"keepalive_pool": {
"properties": {
"idle_timeout": {
"default": 60,
"minimum": 0,
"type": "number"
},
"requests": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"size": {
"default": 320,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"key": {
"description": "the key of chash for dynamic load balancing",
"type": "string"
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"nodes": {
"anyOf": [
{
"patternProperties": {
".*": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
{
"items": {
"properties": {
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"metadata": {
"description": "metadata of node",
"type": "object"
},
"port": {
"description": "port of node",
"minimum": 1,
"type": "integer"
},
"priority": {
"default": 0,
"description": "priority of node",
"type": "integer"
},
"weight": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"required": [
"host",
"port",
"weight"
],
"type": "object"
},
"type": "array"
}
]
},
"pass_host": {
"default": "pass",
"description": "mod of host passing",
"enum": [
"node",
"pass",
"rewrite"
],
"type": "string"
},
"retries": {
"minimum": 0,
"type": "integer"
},
"retry_timeout": {
"minimum": 0,
"type": "number"
},
"scheme": {
"default": "http",
"enum": [
"grpc",
"grpcs",
"http",
"https"
]
},
"service_name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"timeout": {
"properties": {
"connect": {
"exclusiveMinimum": 0,
"type": "number"
},
"read": {
"exclusiveMinimum": 0,
"type": "number"
},
"send": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"connect",
"read",
"send"
],
"type": "object"
},
"tls": {
"properties": {
"client_cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"client_key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
}
},
"required": [
"client_cert",
"client_key"
],
"type": "object"
},
"type": {
"description": "algorithms of load balancing",
"type": "string"
},
"update_time": {
"type": "integer"
},
"upstream_host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
}
},
"type": "object"
},
"upstream_hash_header_schema": {
"pattern": "^[a-zA-Z0-9-_]+$",
"type": "string"
},
"upstream_hash_vars_schema": {
"pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$",
"type": "string"
}
},
"plugins": {
"api-breaker": {
"priority": 1005,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"break_response_code": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"healthy": {
"default": {
"http_statuses": [
200
],
"successes": 3
},
"properties": {
"http_statuses": {
"default": [
200
],
"items": {
"maximum": 499,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"successes": {
"default": 3,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"max_breaker_sec": {
"default": 300,
"minimum": 3,
"type": "integer"
},
"unhealthy": {
"default": {
"failures": 3,
"http_statuses": [
500
]
},
"properties": {
"failures": {
"default": 3,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
500
],
"items": {
"maximum": 599,
"minimum": 500,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
}
},
"type": "object"
}
},
"required": [
"break_response_code"
],
"type": "object"
},
"version": 0.1
},
"authz-casbin": {
"metadata_schema": {
"properties": {
"model": {
"type": "string"
},
"policy": {
"type": "string"
}
},
"required": [
"model",
"policy"
],
"type": "object"
},
"priority": 2560,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"oneOf": [
{
"required": [
"model_path",
"policy_path",
"username"
]
},
{
"required": [
"model",
"policy",
"username"
]
}
],
"properties": {
"disable": {
"type": "boolean"
},
"model": {
"type": "string"
},
"model_path": {
"type": "string"
},
"policy": {
"type": "string"
},
"policy_path": {
"type": "string"
},
"username": {
"type": "string"
}
},
"type": "object"
},
"version": 0.1
},
"authz-keycloak": {
"priority": 2000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"allOf": [
{
"anyOf": [
{
"required": [
"discovery"
]
},
{
"required": [
"token_endpoint"
]
}
]
},
{
"anyOf": [
{
"required": [
"client_id"
]
},
{
"required": [
"audience"
]
}
]
},
{
"anyOf": [
{
"properties": {
"lazy_load_paths": {
"enum": [
false
]
}
}
},
{
"anyOf": [
{
"required": [
"discovery"
]
},
{
"required": [
"resource_registration_endpoint"
]
}
],
"properties": {
"lazy_load_paths": {
"enum": [
true
]
}
}
}
]
}
],
"properties": {
"audience": {
"description": "Deprecated, use `client_id` instead.",
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"cache_ttl_seconds": {
"default": 86400,
"minimum": 1,
"type": "integer"
},
"client_id": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"client_secret": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"disable": {
"type": "boolean"
},
"discovery": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
},
"grant_type": {
"default": "urn:ietf:params:oauth:grant-type:uma-ticket",
"enum": [
"urn:ietf:params:oauth:grant-type:uma-ticket"
],
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"http_method_as_scope": {
"default": false,
"type": "boolean"
},
"keepalive": {
"default": true,
"type": "boolean"
},
"keepalive_pool": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"keepalive_timeout": {
"default": 60000,
"minimum": 1000,
"type": "integer"
},
"lazy_load_paths": {
"default": false,
"type": "boolean"
},
"permissions": {
"default": {},
"items": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"policy_enforcement_mode": {
"default": "ENFORCING",
"enum": [
"ENFORCING",
"PERMISSIVE"
],
"type": "string"
},
"resource_registration_endpoint": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
},
"ssl_verify": {
"default": true,
"type": "boolean"
},
"timeout": {
"default": 3000,
"minimum": 1000,
"type": "integer"
},
"token_endpoint": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"version": 0.1
},
"azure-functions": {
"metadata_schema": {
"properties": {
"master_apikey": {
"default": "",
"type": "string"
},
"master_clientid": {
"default": "",
"type": "string"
}
},
"type": "object"
},
"priority": -1900,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"authorization": {
"properties": {
"apikey": {
"type": "string"
},
"clientid": {
"type": "string"
}
},
"type": "object"
},
"disable": {
"type": "boolean"
},
"function_uri": {
"type": "string"
},
"keepalive": {
"default": true,
"type": "boolean"
},
"keepalive_pool": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"keepalive_timeout": {
"default": 60000,
"minimum": 1000,
"type": "integer"
},
"ssl_verify": {
"default": true,
"type": "boolean"
},
"timeout": {
"default": 3000,
"minimum": 100,
"type": "integer"
}
},
"required": [
"function_uri"
],
"type": "object"
},
"version": 0.1
},
"basic-auth": {
"consumer_schema": {
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"password",
"username"
],
"title": "work with consumer object",
"type": "object"
},
"priority": 2520,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"title": "work with route or service object",
"type": "object"
},
"type": "auth",
"version": 0.1
},
"batch-requests": {
"metadata_schema": {
"properties": {
"max_body_size": {
"default": 1048576,
"description": "max pipeline body size in bytes",
"exclusiveMinimum": 0,
"type": "integer"
}
},
"type": "object"
},
"priority": 4010,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"scope": "global",
"version": 0.1
},
"client-control": {
"priority": 22000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"max_body_size": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"version": 0.1
},
"consumer-restriction": {
"priority": 2400,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"anyOf": [
{
"required": [
"blacklist"
]
},
{
"required": [
"whitelist"
]
},
{
"required": [
"allowed_by_methods"
]
}
],
"properties": {
"allowed_by_methods": {
"items": {
"properties": {
"methods": {
"items": {
"description": "HTTP method",
"enum": [
"CONNECT",
"DELETE",
"GET",
"HEAD",
"OPTIONS",
"PATCH",
"POST",
"PUT",
"TRACE"
],
"type": "string"
},
"minItems": 1,
"type": "array"
},
"user": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"blacklist": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
},
"rejected_code": {
"default": 403,
"minimum": 200,
"type": "integer"
},
"type": {
"default": "consumer_name",
"enum": [
"consumer_name",
"route_id",
"service_id"
],
"type": "string"
},
"whitelist": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"version": 0.1
},
"cors": {
"priority": 4000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"allow_credential": {
"default": false,
"description": "allow client append credential. according to CORS specification,if you set this option to 'true', you can not use '*' for other options.",
"type": "boolean"
},
"allow_headers": {
"default": "*",
"description": "you can use '*' to allow all header when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple header use ',' to split. default: *.",
"type": "string"
},
"allow_methods": {
"default": "*",
"description": "you can use '*' to allow all methods when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple method use ',' to split. default: *.",
"type": "string"
},
"allow_origins": {
"default": "*",
"description": "you can use '*' to allow all origins when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple origin use ',' to split. default: *.",
"pattern": "^(\\*|\\*\\*|null|\\w+://[^,]+(,\\w+://[^,]+)*)$",
"type": "string"
},
"allow_origins_by_regex": {
"description": "you can use regex to allow specific origins when no credentials,for example use [.*\\.test.com] to allow a.test.com and b.test.com",
"items": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"disable": {
"type": "boolean"
},
"expose_headers": {
"default": "*",
"description": "you can use '*' to expose all header when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple header use ',' to split. default: *.",
"type": "string"
},
"max_age": {
"default": 5,
"description": "maximum number of seconds the results can be cached.-1 means no cached, the max value is depend on browser,more details plz check MDN. default: 5.",
"type": "integer"
}
},
"type": "object"
},
"version": 0.1
},
"datadog": {
"metadata_schema": {
"properties": {
"constant_tags": {
"default": [
"source:apisix"
],
"items": {
"type": "string"
},
"type": "array"
},
"host": {
"default": "127.0.0.1",
"type": "string"
},
"namespace": {
"default": "apisix",
"type": "string"
},
"port": {
"default": 8125,
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"priority": 495,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"batch_max_size": {
"default": 5000,
"minimum": 1,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"inactive_timeout": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"max_retry_count": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"prefer_name": {
"default": true,
"type": "boolean"
}
},
"type": "object"
},
"version": 0.1
},
"dubbo-proxy": {
"priority": 507,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"method": {
"minLength": 1,
"type": "string"
},
"service_name": {
"minLength": 1,
"type": "string"
},
"service_version": {
"pattern": "^\\d+\\.\\d+\\.\\d+",
"type": "string"
}
},
"required": [
"service_name",
"service_version"
],
"type": "object"
},
"version": 0.1
},
"echo": {
"priority": 412,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"anyOf": [
{
"required": [
"before_body"
]
},
{
"required": [
"body"
]
},
{
"required": [
"after_body"
]
}
],
"minProperties": 1,
"properties": {
"after_body": {
"description": "body after the modification of filter phase.",
"type": "string"
},
"before_body": {
"description": "body before the filter phase.",
"type": "string"
},
"body": {
"description": "body to replace upstream response.",
"type": "string"
},
"disable": {
"type": "boolean"
},
"headers": {
"description": "new headers for response",
"minProperties": 1,
"type": "object"
}
},
"type": "object"
},
"version": 0.1
},
"error-log-logger": {
"metadata_schema": {
"oneOf": [
{
"required": [
"skywalking"
]
},
{
"required": [
"tcp"
]
},
{
"required": [
"host",
"port"
]
}
],
"properties": {
"batch_max_size": {
"default": 1000,
"minimum": 0,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"host": {
"1": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"description": "Deprecated, use `tcp.host` instead."
},
"inactive_timeout": {
"default": 3,
"minimum": 1,
"type": "integer"
},
"keepalive": {
"default": 30,
"minimum": 1,
"type": "integer"
},
"level": {
"default": "WARN",
"enum": [
"ALERT",
"CRIT",
"DEBUG",
"EMERG",
"ERR",
"ERROR",
"INFO",
"NOTICE",
"STDERR",
"WARN"
],
"type": "string"
},
"max_retry_count": {
"default": 0,
"minimum": 0,
"type": "integer"
},
"name": {
"default": "error-log-logger",
"type": "string"
},
"port": {
"description": "Deprecated, use `tcp.port` instead.",
"minimum": 0,
"type": "integer"
},
"retry_delay": {
"default": 1,
"minimum": 0,
"type": "integer"
},
"skywalking": {
"properties": {
"endpoint_addr": {
"default": "http://127.0.0.1:12900/v3/logs"
},
"service_instance_name": {
"default": "APISIX Service Instance",
"type": "string"
},
"service_name": {
"default": "APISIX",
"type": "string"
}
},
"type": "object"
},
"tcp": {
"properties": {
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"port": {
"minimum": 0,
"type": "integer"
},
"tls": {
"default": false,
"type": "boolean"
},
"tls_server_name": {
"type": "string"
}
},
"required": [
"host",
"port"
],
"type": "object"
},
"timeout": {
"default": 3,
"minimum": 1,
"type": "integer"
},
"tls": {
"default": false,
"description": "Deprecated, use `tcp.tls` instead.",
"type": "boolean"
},
"tls_server_name": {
"description": "Deprecated, use `tcp.tls_server_name` instead.",
"type": "string"
}
},
"type": "object"
},
"priority": 1091,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"scope": "global",
"version": 0.1
},
"example-plugin": {
"metadata_schema": {
"properties": {
"ikey": {
"minimum": 0,
"type": "number"
},
"skey": {
"type": "string"
}
},
"required": [
"ikey",
"skey"
],
"type": "object"
},
"priority": 0,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"i": {
"minimum": 0,
"type": "number"
},
"ip": {
"type": "string"
},
"port": {
"type": "integer"
},
"s": {
"type": "string"
},
"t": {
"minItems": 1,
"type": "array"
}
},
"required": [
"i"
],
"type": "object"
},
"version": 0.1
},
"ext-plugin-post-req": {
"priority": -3000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"conf": {
"items": {
"properties": {
"name": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"version": 0.1
},
"ext-plugin-pre-req": {
"priority": 12000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"conf": {
"items": {
"properties": {
"name": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"version": 0.1
},
"fault-injection": {
"priority": 11000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"minProperties": 1,
"properties": {
"abort": {
"properties": {
"body": {
"minLength": 0,
"type": "string"
},
"http_status": {
"minimum": 200,
"type": "integer"
},
"percentage": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"vars": {
"items": {
"type": "array"
},
"maxItems": 20,
"type": "array"
}
},
"required": [
"http_status"
],
"type": "object"
},
"delay": {
"properties": {
"duration": {
"minimum": 0,
"type": "number"
},
"percentage": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"vars": {
"items": {
"type": "array"
},
"maxItems": 20,
"type": "array"
}
},
"required": [
"duration"
],
"type": "object"
},
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"version": 0.1
},
"grpc-transcode": {
"priority": 506,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"additionalProperties": true,
"properties": {
"deadline": {
"default": 0,
"description": "deadline for grpc, millisecond",
"type": "number"
},
"disable": {
"type": "boolean"
},
"method": {
"description": "the method name in the grpc service.",
"type": "string"
},
"pb_option": {
"items": {
"anyOf": [
{
"description": "enum as result",
"enum": [
"int64_as_hexstring",
"int64_as_number",
"int64_as_string"
],
"type": "string"
},
{
"description": "int64 as result",
"enum": [
"enum_as_name",
"enum_as_value"
],
"type": "string"
},
{
"description": "default values option",
"enum": [
"auto_default_values",
"no_default_values",
"use_default_metatable",
"use_default_values"
],
"type": "string"
},
{
"description": "hooks option",
"enum": [
"disable_hooks",
"enable_hooks"
],
"type": "string"
}
],
"type": "string"
},
"minItems": 1,
"type": "array"
},
"proto_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"service": {
"description": "the grpc service name",
"type": "string"
}
},
"required": [
"method",
"proto_id",
"service"
],
"type": "object"
},
"version": 0.1
},
"gzip": {
"priority": 995,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"buffers": {
"default": {
"number": 32,
"size": 4096
},
"properties": {
"number": {
"default": 32,
"minimum": 1,
"type": "integer"
},
"size": {
"default": 4096,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"comp_level": {
"default": 1,
"maximum": 9,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"http_version": {
"default": 1.1,
"enum": [
1,
1.1
]
},
"min_length": {
"default": 20,
"minimum": 1,
"type": "integer"
},
"types": {
"anyOf": [
{
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
{
"enum": [
"*"
]
}
],
"default": [
"text/html"
]
},
"vary": {
"type": "boolean"
}
},
"type": "object"
},
"version": 0.1
},
"hmac-auth": {
"consumer_schema": {
"properties": {
"access_key": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"algorithm": {
"default": "hmac-sha256",
"enum": [
"hmac-sha1",
"hmac-sha256",
"hmac-sha512"
],
"type": "string"
},
"clock_skew": {
"default": 0,
"type": "integer"
},
"encode_uri_params": {
"default": true,
"title": "Whether to escape the uri parameter",
"type": "boolean"
},
"keep_headers": {
"default": false,
"title": "whether to keep the http request header",
"type": "boolean"
},
"max_req_body": {
"default": 524288,
"title": "Max request body size",
"type": "integer"
},
"secret_key": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"signed_headers": {
"items": {
"maxLength": 50,
"minLength": 1,
"type": "string"
},
"type": "array"
},
"validate_request_body": {
"default": false,
"title": "A boolean value telling the plugin to enable body validation",
"type": "boolean"
}
},
"required": [
"access_key",
"secret_key"
],
"title": "work with consumer object",
"type": "object"
},
"priority": 2530,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"title": "work with route or service object",
"type": "object"
},
"type": "auth",
"version": 0.1
},
"http-logger": {
"metadata_schema": {
"properties": {
"log_format": {
"default": {
"@timestamp": "$time_iso8601",
"client_ip": "$remote_addr",
"host": "$host"
},
"type": "object"
}
},
"type": "object"
},
"priority": 410,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"auth_header": {
"default": "",
"type": "string"
},
"batch_max_size": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"concat_method": {
"default": "json",
"enum": [
"json",
"new_line"
],
"type": "string"
},
"disable": {
"type": "boolean"
},
"inactive_timeout": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"include_req_body": {
"default": false,
"type": "boolean"
},
"max_retry_count": {
"default": 0,
"minimum": 0,
"type": "integer"
},
"name": {
"default": "http logger",
"type": "string"
},
"retry_delay": {
"default": 1,
"minimum": 0,
"type": "integer"
},
"timeout": {
"default": 3,
"minimum": 1,
"type": "integer"
},
"uri": {
"pattern": "^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?",
"type": "string"
}
},
"required": [
"uri"
],
"type": "object"
},
"version": 0.1
},
"ip-restriction": {
"priority": 3000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"oneOf": [
{
"required": [
"whitelist"
]
},
{
"required": [
"blacklist"
]
}
],
"properties": {
"blacklist": {
"items": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
]
},
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
},
"message": {
"default": "Your IP address is not allowed",
"maxLength": 1024,
"minLength": 1,
"type": "string"
},
"whitelist": {
"items": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
]
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"version": 0.1
},
"jwt-auth": {
"consumer_schema": {
"dependencies": {
"algorithm": {
"oneOf": [
{
"properties": {
"algorithm": {
"default": "HS256",
"enum": [
"HS256",
"HS512"
]
}
}
},
{
"properties": {
"algorithm": {
"enum": [
"RS256"
]
},
"private_key": {
"type": "string"
},
"public_key": {
"type": "string"
}
},
"required": [
"private_key",
"public_key"
]
}
]
}
},
"properties": {
"algorithm": {
"default": "HS256",
"enum": [
"HS256",
"HS512",
"RS256"
],
"type": "string"
},
"base64_secret": {
"default": false,
"type": "boolean"
},
"exp": {
"default": 86400,
"minimum": 1,
"type": "integer"
},
"key": {
"type": "string"
},
"secret": {
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"priority": 2510,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"type": "auth",
"version": 0.1
},
"kafka-logger": {
"metadata_schema": {
"properties": {
"log_format": {
"default": {
"@timestamp": "$time_iso8601",
"client_ip": "$remote_addr",
"host": "$host"
},
"type": "object"
}
},
"type": "object"
},
"priority": 403,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"batch_max_size": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"broker_list": {
"minProperties": 1,
"patternProperties": {
".*": {
"description": "the port of kafka broker",
"maximum": 65535,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"cluster_name": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"inactive_timeout": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"include_req_body": {
"default": false,
"type": "boolean"
},
"include_req_body_expr": {
"items": {
"items": {
"type": "string"
},
"type": "array"
},
"minItems": 1,
"type": "array"
},
"kafka_topic": {
"type": "string"
},
"key": {
"type": "string"
},
"max_retry_count": {
"default": 0,
"minimum": 0,
"type": "integer"
},
"meta_format": {
"default": "default",
"enum": [
"default",
"origin"
],
"type": "string"
},
"name": {
"default": "kafka logger",
"type": "string"
},
"producer_type": {
"default": "async",
"enum": [
"async",
"sync"
],
"type": "string"
},
"required_acks": {
"default": 1,
"enum": [
-1,
0,
1
],
"type": "integer"
},
"retry_delay": {
"default": 1,
"minimum": 0,
"type": "integer"
},
"timeout": {
"default": 3,
"minimum": 1,
"type": "integer"
}
},
"required": [
"broker_list",
"kafka_topic"
],
"type": "object"
},
"version": 0.1
},
"key-auth": {
"consumer_schema": {
"properties": {
"key": {
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"priority": 2500,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"header": {
"default": "apikey",
"type": "string"
},
"query": {
"default": "apikey",
"type": "string"
}
},
"type": "object"
},
"type": "auth",
"version": 0.1
},
"ldap-auth": {
"consumer_schema": {
"properties": {
"user_dn": {
"type": "string"
}
},
"required": [
"user_dn"
],
"title": "work with consumer object",
"type": "object"
},
"priority": 2540,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"base_dn": {
"type": "string"
},
"disable": {
"type": "boolean"
},
"ldap_uri": {
"type": "string"
},
"uid": {
"type": "string"
},
"use_tls": {
"type": "boolean"
}
},
"required": [
"base_dn",
"ldap_uri"
],
"title": "work with route or service object",
"type": "object"
},
"type": "auth",
"version": 0.1
},
"limit-conn": {
"priority": 1003,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"allow_degradation": {
"default": false,
"type": "boolean"
},
"burst": {
"minimum": 0,
"type": "integer"
},
"conn": {
"exclusiveMinimum": 0,
"type": "integer"
},
"default_conn_delay": {
"exclusiveMinimum": 0,
"type": "number"
},
"disable": {
"type": "boolean"
},
"key": {
"type": "string"
},
"key_type": {
"default": "var",
"enum": [
"var",
"var_combination"
],
"type": "string"
},
"only_use_default_delay": {
"default": false,
"type": "boolean"
},
"rejected_code": {
"default": 503,
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"rejected_msg": {
"minLength": 1,
"type": "string"
}
},
"required": [
"burst",
"conn",
"default_conn_delay",
"key"
],
"type": "object"
},
"version": 0.1
},
"limit-count": {
"priority": 1002,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"dependencies": {
"policy": {
"oneOf": [
{
"properties": {
"policy": {
"enum": [
"local"
]
}
}
},
{
"properties": {
"policy": {
"enum": [
"redis"
]
},
"redis_database": {
"default": 0,
"minimum": 0,
"type": "integer"
},
"redis_host": {
"minLength": 2,
"type": "string"
},
"redis_password": {
"minLength": 0,
"type": "string"
},
"redis_port": {
"default": 6379,
"minimum": 1,
"type": "integer"
},
"redis_timeout": {
"default": 1000,
"minimum": 1,
"type": "integer"
}
},
"required": [
"redis_host"
]
},
{
"properties": {
"policy": {
"enum": [
"redis-cluster"
]
},
"redis_cluster_name": {
"type": "string"
},
"redis_cluster_nodes": {
"items": {
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"minItems": 2,
"type": "array"
},
"redis_password": {
"minLength": 0,
"type": "string"
},
"redis_timeout": {
"default": 1000,
"minimum": 1,
"type": "integer"
}
},
"required": [
"redis_cluster_name",
"redis_cluster_nodes"
]
}
]
}
},
"properties": {
"allow_degradation": {
"default": false,
"type": "boolean"
},
"count": {
"exclusiveMinimum": 0,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"key": {
"default": "remote_addr",
"type": "string"
},
"key_type": {
"default": "var",
"enum": [
"var",
"var_combination"
],
"type": "string"
},
"policy": {
"default": "local",
"enum": [
"local",
"redis",
"redis-cluster"
],
"type": "string"
},
"rejected_code": {
"default": 503,
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"rejected_msg": {
"minLength": 1,
"type": "string"
},
"show_limit_quota_header": {
"default": true,
"type": "boolean"
},
"time_window": {
"exclusiveMinimum": 0,
"type": "integer"
}
},
"required": [
"count",
"time_window"
],
"type": "object"
},
"version": 0.4
},
"limit-req": {
"priority": 1001,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"allow_degradation": {
"default": false,
"type": "boolean"
},
"burst": {
"minimum": 0,
"type": "number"
},
"disable": {
"type": "boolean"
},
"key": {
"type": "string"
},
"key_type": {
"default": "var",
"enum": [
"var",
"var_combination"
],
"type": "string"
},
"nodelay": {
"default": false,
"type": "boolean"
},
"rate": {
"exclusiveMinimum": 0,
"type": "number"
},
"rejected_code": {
"default": 503,
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"rejected_msg": {
"minLength": 1,
"type": "string"
}
},
"required": [
"burst",
"key",
"rate"
],
"type": "object"
},
"version": 0.1
},
"log-rotate": {
"priority": 100,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"scope": "global",
"version": 0.1
},
"node-status": {
"priority": 1000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"scope": "global",
"version": 0.1
},
"openid-connect": {
"priority": 2599,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"access_token_in_authorization_header": {
"default": false,
"description": "Whether the access token should be added in the Authorization header as opposed to the X-Access-Token header.",
"type": "boolean"
},
"bearer_only": {
"default": false,
"type": "boolean"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"disable": {
"type": "boolean"
},
"discovery": {
"type": "string"
},
"introspection_endpoint": {
"type": "string"
},
"introspection_endpoint_auth_method": {
"default": "client_secret_basic",
"type": "string"
},
"logout_path": {
"default": "/logout",
"type": "string"
},
"public_key": {
"type": "string"
},
"realm": {
"default": "apisix",
"type": "string"
},
"redirect_uri": {
"description": "use ngx.var.request_uri if not configured",
"type": "string"
},
"scope": {
"default": "openid",
"type": "string"
},
"set_access_token_header": {
"default": true,
"description": "Whether the access token should be added as a header to the request for downstream",
"type": "boolean"
},
"set_id_token_header": {
"default": true,
"description": "Whether the ID token should be added in the X-ID-Token header to the request for downstream.",
"type": "boolean"
},
"set_userinfo_header": {
"default": true,
"description": "Whether the user info token should be added in the X-Userinfo header to the request for downstream.",
"type": "boolean"
},
"ssl_verify": {
"default": false,
"type": "boolean"
},
"timeout": {
"default": 3,
"description": "timeout in seconds",
"minimum": 1,
"type": "integer"
},
"token_signing_alg_values_expected": {
"type": "string"
}
},
"required": [
"client_id",
"client_secret",
"discovery"
],
"type": "object"
},
"version": 0.1
},
"prometheus": {
"priority": 500,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"prefer_name": {
"default": false,
"type": "boolean"
}
},
"type": "object"
},
"version": 0.2
},
"proxy-cache": {
"priority": 1009,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"cache_bypass": {
"items": {
"pattern": "(^[^\\$].+$|^\\$[0-9a-zA-Z_]+$)",
"type": "string"
},
"minItems": 1,
"type": "array"
},
"cache_control": {
"default": false,
"type": "boolean"
},
"cache_http_status": {
"default": [
200,
301,
404
],
"items": {
"description": "http response status",
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"cache_key": {
"default": [
"$host",
"$request_uri"
],
"items": {
"description": "a key for caching",
"pattern": "(^[^\\$].+$|^\\$[0-9a-zA-Z_]+$)",
"type": "string"
},
"minItems": 1,
"type": "array"
},
"cache_method": {
"default": [
"GET",
"HEAD"
],
"items": {
"description": "supported http method",
"enum": [
"GET",
"HEAD",
"POST"
],
"type": "string"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"cache_strategy": {
"default": "disk",
"enum": [
"disk",
"memory"
],
"type": "string"
},
"cache_ttl": {
"default": 300,
"minimum": 1,
"type": "integer"
},
"cache_zone": {
"default": "disk_cache_one",
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"disable": {
"type": "boolean"
},
"hide_cache_headers": {
"default": false,
"type": "boolean"
},
"no_cache": {
"items": {
"pattern": "(^[^\\$].+$|^\\$[0-9a-zA-Z_]+$)",
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"version": 0.2
},
"proxy-mirror": {
"priority": 1010,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"minProperties": 1,
"properties": {
"disable": {
"type": "boolean"
},
"host": {
"pattern": "^http(s)?:\\/\\/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:[0-9]{1,5})?$",
"type": "string"
},
"sample_ratio": {
"default": 1,
"maximum": 1,
"minimum": 0.00001,
"type": "number"
}
},
"required": [
"host"
],
"type": "object"
},
"version": 0.1
},
"proxy-rewrite": {
"priority": 1008,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"minProperties": 1,
"properties": {
"disable": {
"type": "boolean"
},
"headers": {
"description": "new headers for request",
"minProperties": 1,
"type": "object"
},
"host": {
"description": "new host for upstream",
"pattern": "^[0-9a-zA-Z-.]+(:\\d{1,5})?$",
"type": "string"
},
"method": {
"description": "proxy route method",
"enum": [
"COPY",
"DELETE",
"GET",
"HEAD",
"LOCK",
"MKCOL",
"MOVE",
"OPTIONS",
"PATCH",
"POST",
"PROPFIND",
"PUT",
"TRACE",
"UNLOCK"
],
"type": "string"
},
"regex_uri": {
"description": "new uri that substitute from client uri for upstream, lower priority than uri property",
"items": {
"description": "regex uri",
"type": "string"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"scheme": {
"description": "new scheme for upstream",
"enum": [
"http",
"https"
],
"type": "string"
},
"uri": {
"description": "new uri for upstream",
"maxLength": 4096,
"minLength": 1,
"pattern": "^\\/.*",
"type": "string"
}
},
"type": "object"
},
"version": 0.1
},
"real-ip": {
"priority": 23000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"source": {
"minLength": 1,
"type": "string"
},
"trusted_addresses": {
"items": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
]
},
"minItems": 1,
"type": "array"
}
},
"required": [
"source"
],
"type": "object"
},
"version": 0.1
},
"redirect": {
"priority": 900,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"oneOf": [
{
"required": [
"uri"
]
},
{
"required": [
"regex_uri"
]
},
{
"required": [
"http_to_https"
]
}
],
"properties": {
"append_query_string": {
"default": false,
"type": "boolean"
},
"disable": {
"type": "boolean"
},
"encode_uri": {
"default": false,
"type": "boolean"
},
"http_to_https": {
"type": "boolean"
},
"regex_uri": {
"description": "params for generating new uri that substitute from client uri, first param is regular expression, the second one is uri template",
"items": {
"description": "regex uri",
"type": "string"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"ret_code": {
"default": 302,
"minimum": 200,
"type": "integer"
},
"uri": {
"minLength": 2,
"pattern": "(\\\\\\$[0-9a-zA-Z_]+)|\\$\\{([0-9a-zA-Z_]+)\\}|\\$([0-9a-zA-Z_]+)|(\\$|[^$\\\\]+)",
"type": "string"
}
},
"type": "object"
},
"version": 0.1
},
"referer-restriction": {
"priority": 2990,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"oneOf": [
{
"required": [
"whitelist"
]
},
{
"required": [
"blacklist"
]
}
],
"properties": {
"blacklist": {
"items": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"minItems": 1,
"type": "array"
},
"bypass_missing": {
"default": false,
"type": "boolean"
},
"disable": {
"type": "boolean"
},
"message": {
"default": "Your referer host is not allowed",
"maxLength": 1024,
"minLength": 1,
"type": "string"
},
"whitelist": {
"items": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"version": 0.1
},
"request-id": {
"priority": 11010,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"algorithm": {
"default": "uuid",
"enum": [
"snowflake",
"uuid"
],
"type": "string"
},
"disable": {
"type": "boolean"
},
"header_name": {
"default": "X-Request-Id",
"type": "string"
},
"include_in_response": {
"default": true,
"type": "boolean"
}
},
"type": "object"
},
"version": 0.1
},
"request-validation": {
"priority": 2800,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"anyOf": [
{
"required": [
"header_schema"
]
},
{
"required": [
"body_schema"
]
}
],
"properties": {
"body_schema": {
"type": "object"
},
"disable": {
"type": "boolean"
},
"header_schema": {
"type": "object"
},
"rejected_msg": {
"maxLength": 256,
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"type": "validation",
"version": 0.1
},
"response-rewrite": {
"priority": 899,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"minProperties": 1,
"properties": {
"body": {
"description": "new body for response",
"type": "string"
},
"body_base64": {
"default": false,
"description": "whether new body for response need base64 decode before return",
"type": "boolean"
},
"disable": {
"type": "boolean"
},
"headers": {
"description": "new headers for response",
"minProperties": 1,
"type": "object"
},
"status_code": {
"description": "new status code for response",
"maximum": 598,
"minimum": 200,
"type": "integer"
},
"vars": {
"type": "array"
}
},
"type": "object"
},
"version": 0.1
},
"server-info": {
"priority": 990,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
}
},
"type": "object"
},
"scope": "global",
"version": 0.1
},
"serverless-post-function": {
"priority": -2000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"functions": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"phase": {
"default": "access",
"enum": [
"access",
"balancer",
"body_filter",
"header_filter",
"log",
"rewrite"
],
"type": "string"
}
},
"required": [
"functions"
],
"type": "object"
},
"version": 0.1
},
"serverless-pre-function": {
"priority": 10000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"functions": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"phase": {
"default": "access",
"enum": [
"access",
"balancer",
"body_filter",
"header_filter",
"log",
"rewrite"
],
"type": "string"
}
},
"required": [
"functions"
],
"type": "object"
},
"version": 0.1
},
"skywalking": {
"priority": -1100,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"sample_ratio": {
"default": 1,
"maximum": 1,
"minimum": 0.00001,
"type": "number"
}
},
"type": "object"
},
"version": 0.1
},
"skywalking-logger": {
"metadata_schema": {
"properties": {
"log_format": {
"default": {
"@timestamp": "$time_iso8601",
"client_ip": "$remote_addr",
"host": "$host"
},
"type": "object"
}
},
"type": "object"
},
"priority": 408,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"batch_max_size": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"endpoint_addr": {
"pattern": "^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?",
"type": "string"
},
"inactive_timeout": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"include_req_body": {
"default": false,
"type": "boolean"
},
"max_retry_count": {
"default": 0,
"minimum": 0,
"type": "integer"
},
"name": {
"default": "skywalking logger",
"type": "string"
},
"retry_delay": {
"default": 1,
"minimum": 0,
"type": "integer"
},
"service_instance_name": {
"default": "APISIX Instance Name",
"type": "string"
},
"service_name": {
"default": "APISIX",
"type": "string"
},
"timeout": {
"default": 3,
"minimum": 1,
"type": "integer"
}
},
"required": [
"endpoint_addr"
],
"type": "object"
},
"version": 0.1
},
"sls-logger": {
"priority": 406,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"access_key_id": {
"type": "string"
},
"access_key_secret": {
"type": "string"
},
"batch_max_size": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"host": {
"type": "string"
},
"inactive_timeout": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"include_req_body": {
"default": false,
"type": "boolean"
},
"logstore": {
"type": "string"
},
"max_retry_count": {
"default": 0,
"minimum": 0,
"type": "integer"
},
"name": {
"default": "sls-logger",
"type": "string"
},
"port": {
"type": "integer"
},
"project": {
"type": "string"
},
"retry_delay": {
"default": 1,
"minimum": 0,
"type": "integer"
},
"timeout": {
"default": 5000,
"minimum": 1,
"type": "integer"
}
},
"required": [
"access_key_id",
"access_key_secret",
"host",
"logstore",
"port",
"project"
],
"type": "object"
},
"version": 0.1
},
"syslog": {
"priority": 401,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"batch_max_size": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"drop_limit": {
"default": 1048576,
"type": "integer"
},
"flush_limit": {
"default": 4096,
"minimum": 1,
"type": "integer"
},
"host": {
"type": "string"
},
"include_req_body": {
"default": false,
"type": "boolean"
},
"max_retry_times": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"name": {
"default": "sys logger",
"type": "string"
},
"pool_size": {
"default": 5,
"minimum": 5,
"type": "integer"
},
"port": {
"type": "integer"
},
"retry_interval": {
"default": 1,
"minimum": 0,
"type": "integer"
},
"sock_type": {
"default": "tcp",
"enum": [
"tcp",
"udp"
],
"type": "string"
},
"timeout": {
"default": 3,
"minimum": 1,
"type": "integer"
},
"tls": {
"default": false,
"type": "boolean"
}
},
"required": [
"host",
"port"
],
"type": "object"
},
"version": 0.1
},
"tcp-logger": {
"priority": 405,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"batch_max_size": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"host": {
"type": "string"
},
"inactive_timeout": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"include_req_body": {
"default": false,
"type": "boolean"
},
"max_retry_count": {
"default": 0,
"minimum": 0,
"type": "integer"
},
"name": {
"default": "tcp logger",
"type": "string"
},
"port": {
"minimum": 0,
"type": "integer"
},
"retry_delay": {
"default": 1,
"minimum": 0,
"type": "integer"
},
"timeout": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"tls": {
"default": false,
"type": "boolean"
},
"tls_options": {
"type": "string"
}
},
"required": [
"host",
"port"
],
"type": "object"
},
"version": 0.1
},
"traffic-split": {
"priority": 966,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"rules": {
"items": {
"properties": {
"match": {
"items": {
"properties": {
"vars": {
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"weighted_upstreams": {
"default": [
{
"weight": 1
}
],
"items": {
"properties": {
"upstream": {
"oneOf": [
{
"required": [
"nodes",
"type"
]
},
{
"required": [
"discovery_type",
"service_name",
"type"
]
}
],
"properties": {
"checks": {
"anyOf": [
{
"required": [
"active"
]
},
{
"required": [
"active",
"passive"
]
}
],
"properties": {
"active": {
"properties": {
"concurrency": {
"default": 10,
"type": "integer"
},
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
302
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"successes": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"http_path": {
"default": "/",
"type": "string"
},
"https_verify_certificate": {
"default": true,
"type": "boolean"
},
"port": {
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"req_headers": {
"items": {
"type": "string",
"uniqueItems": true
},
"minItems": 1,
"type": "array"
},
"timeout": {
"default": 1,
"type": "number"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
404,
429,
500,
501,
502,
503,
504,
505
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"interval": {
"default": 1,
"minimum": 1,
"type": "integer"
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 3,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"passive": {
"properties": {
"healthy": {
"properties": {
"http_statuses": {
"default": [
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"successes": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"http_statuses": {
"default": [
429,
500,
503
],
"items": {
"maximum": 599,
"minimum": 200,
"type": "integer"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"tcp_failures": {
"default": 2,
"maximum": 254,
"minimum": 1,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
},
"hash_on": {
"default": "vars",
"enum": [
"consumer",
"cookie",
"header",
"vars",
"vars_combinations"
],
"type": "string"
},
"id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"keepalive_pool": {
"properties": {
"idle_timeout": {
"default": 60,
"minimum": 0,
"type": "number"
},
"requests": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"size": {
"default": 320,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"key": {
"description": "the key of chash for dynamic load balancing",
"type": "string"
},
"labels": {
"description": "key/value pairs to specify attributes",
"maxProperties": 16,
"patternProperties": {
".*": {
"description": "value of label",
"maxLength": 64,
"minLength": 1,
"pattern": "^\\S+$",
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"nodes": {
"anyOf": [
{
"patternProperties": {
".*": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
{
"items": {
"properties": {
"host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"metadata": {
"description": "metadata of node",
"type": "object"
},
"port": {
"description": "port of node",
"minimum": 1,
"type": "integer"
},
"priority": {
"default": 0,
"description": "priority of node",
"type": "integer"
},
"weight": {
"description": "weight of node",
"minimum": 0,
"type": "integer"
}
},
"required": [
"host",
"port",
"weight"
],
"type": "object"
},
"type": "array"
}
]
},
"pass_host": {
"default": "pass",
"description": "mod of host passing",
"enum": [
"node",
"pass",
"rewrite"
],
"type": "string"
},
"retries": {
"minimum": 0,
"type": "integer"
},
"retry_timeout": {
"minimum": 0,
"type": "number"
},
"scheme": {
"default": "http",
"enum": [
"grpc",
"grpcs",
"http",
"https"
]
},
"service_name": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"timeout": {
"properties": {
"connect": {
"exclusiveMinimum": 0,
"type": "number"
},
"read": {
"exclusiveMinimum": 0,
"type": "number"
},
"send": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"connect",
"read",
"send"
],
"type": "object"
},
"tls": {
"properties": {
"client_cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"client_key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
}
},
"required": [
"client_cert",
"client_key"
],
"type": "object"
},
"type": {
"description": "algorithms of load balancing",
"type": "string"
},
"update_time": {
"type": "integer"
},
"upstream_host": {
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
}
},
"type": "object"
},
"upstream_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"weight": {
"default": 1,
"description": "used to split traffic between differentupstreams for plugin configuration",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"version": 0.1
},
"ua-restriction": {
"priority": 2999,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"allowlist": {
"minItems": 1,
"type": "array"
},
"bypass_missing": {
"default": false,
"type": "boolean"
},
"denylist": {
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
},
"message": {
"default": "Not allowed",
"maxLength": 1024,
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"version": 0.1
},
"udp-logger": {
"priority": 400,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"batch_max_size": {
"default": 1000,
"minimum": 1,
"type": "integer"
},
"buffer_duration": {
"default": 60,
"minimum": 1,
"type": "integer"
},
"disable": {
"type": "boolean"
},
"host": {
"type": "string"
},
"inactive_timeout": {
"default": 5,
"minimum": 1,
"type": "integer"
},
"include_req_body": {
"default": false,
"type": "boolean"
},
"name": {
"default": "udp logger",
"type": "string"
},
"port": {
"minimum": 0,
"type": "integer"
},
"timeout": {
"default": 3,
"minimum": 1,
"type": "integer"
}
},
"required": [
"host",
"port"
],
"type": "object"
},
"version": 0.1
},
"uri-blocker": {
"priority": 2900,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"block_rules": {
"items": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"case_insensitive": {
"default": false,
"type": "boolean"
},
"disable": {
"type": "boolean"
},
"rejected_code": {
"default": 403,
"minimum": 200,
"type": "integer"
},
"rejected_msg": {
"minLength": 1,
"type": "string"
}
},
"required": [
"block_rules"
],
"type": "object"
},
"version": 0.1
},
"wolf-rbac": {
"priority": 2555,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"appid": {
"default": "unset",
"type": "string"
},
"disable": {
"type": "boolean"
},
"header_prefix": {
"default": "X-",
"type": "string"
},
"server": {
"default": "http://127.0.0.1:12180",
"type": "string"
}
},
"type": "object"
},
"type": "auth",
"version": 0.1
},
"zipkin": {
"priority": 11011,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"endpoint": {
"type": "string"
},
"sample_ratio": {
"maximum": 1,
"minimum": 0.00001,
"type": "number"
},
"server_addr": {
"description": "default is $server_addr, you can specify your external ip address",
"pattern": "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$",
"type": "string"
},
"service_name": {
"default": "APISIX",
"description": "service name for zipkin reporter",
"type": "string"
},
"span_version": {
"default": 2,
"enum": [
1,
2
]
}
},
"required": [
"endpoint",
"sample_ratio"
],
"type": "object"
},
"version": 0.1
}
},
"stream_plugins": {
"ip-restriction": {
"priority": 3000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"oneOf": [
{
"required": [
"whitelist"
]
},
{
"required": [
"blacklist"
]
}
],
"properties": {
"blacklist": {
"items": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
]
},
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
},
"message": {
"default": "Your IP address is not allowed",
"maxLength": 1024,
"minLength": 1,
"type": "string"
},
"whitelist": {
"items": {
"anyOf": [
{
"format": "ipv4",
"title": "IPv4",
"type": "string"
},
{
"pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
"title": "IPv4/CIDR",
"type": "string"
},
{
"format": "ipv6",
"title": "IPv6",
"type": "string"
},
{
"pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
"title": "IPv6/CIDR",
"type": "string"
}
]
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"version": 0.1
},
"limit-conn": {
"priority": 1003,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"burst": {
"minimum": 0,
"type": "integer"
},
"conn": {
"exclusiveMinimum": 0,
"type": "integer"
},
"default_conn_delay": {
"exclusiveMinimum": 0,
"type": "number"
},
"disable": {
"type": "boolean"
},
"key": {
"type": "string"
},
"key_type": {
"default": "var",
"enum": [
"var",
"var_combination"
],
"type": "string"
},
"only_use_default_delay": {
"default": false,
"type": "boolean"
}
},
"required": [
"burst",
"conn",
"default_conn_delay",
"key"
],
"type": "object"
},
"version": 0.1
},
"mqtt-proxy": {
"priority": 1000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"protocol_level": {
"type": "integer"
},
"protocol_name": {
"type": "string"
},
"upstream": {
"oneOf": [
{
"required": [
"host",
"port"
]
},
{
"required": [
"ip",
"port"
]
}
],
"properties": {
"host": {
"type": "string"
},
"ip": {
"type": "string"
},
"port": {
"type": "number"
}
},
"type": "object"
}
},
"required": [
"protocol_level",
"protocol_name",
"upstream"
],
"type": "object"
},
"version": 0.1
}
}
}