gen-jhipster
Version:
Spring Boot + Angular/React/Vue in one handy generator
2,332 lines • 246 kB
JSON
{
"main": {
"consumer": {
"properties": {
"create_time": {
"type": "integer"
},
"desc": {
"maxLength": 256,
"type": "string"
},
"group_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",
"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",
"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",
"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",
"PURGE",
"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"
}
]
},
"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": 0,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 0,
"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": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 0,
"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",
"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",
"description": "The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka.",
"enum": [
"grpc",
"grpcs",
"http",
"https",
"kafka",
"tcp",
"tls",
"udp"
]
},
"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": {
"dependencies": {
"client_cert": {
"not": {
"required": [
"client_cert_id"
]
},
"required": [
"client_key"
]
},
"client_cert_id": {
"not": {
"required": [
"client_client",
"client_key"
]
}
},
"client_key": {
"not": {
"required": [
"client_cert_id"
]
},
"required": [
"client_cert"
]
}
},
"properties": {
"client_cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"client_cert_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"client_key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"verify": {
"default": false,
"description": "Turn on server certificate verification, currently only kafka upstream is supported",
"type": "boolean"
}
},
"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",
"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": 0,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 0,
"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": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 0,
"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",
"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",
"description": "The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka.",
"enum": [
"grpc",
"grpcs",
"http",
"https",
"kafka",
"tcp",
"tls",
"udp"
]
},
"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": {
"dependencies": {
"client_cert": {
"not": {
"required": [
"client_cert_id"
]
},
"required": [
"client_key"
]
},
"client_cert_id": {
"not": {
"required": [
"client_client",
"client_key"
]
}
},
"client_key": {
"not": {
"required": [
"client_cert_id"
]
},
"required": [
"client_cert"
]
}
},
"properties": {
"client_cert": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"client_cert_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
},
"client_key": {
"maxLength": 65536,
"minLength": 128,
"type": "string"
},
"verify": {
"default": false,
"description": "Turn on server certificate verification, currently only kafka upstream is supported",
"type": "boolean"
}
},
"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": {
"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",
"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"
},
"type": {
"default": "server",
"description": "ssl certificate type, server to server certificate, client to client certificate for upstream",
"enum": [
"client",
"server"
],
"type": "string"
},
"update_time": {
"type": "integer"
},
"validity_end": {
"type": "integer"
},
"validity_start": {
"type": "integer"
}
},
"if": {
"properties": {
"type": {
"enum": [
"server"
]
}
}
},
"else": {
"required": [
"cert",
"key"
]
},
"then": {
"oneOf": [
{
"required": [
"cert",
"key",
"sni"
]
},
{
"required": [
"cert",
"key",
"snis"
]
}
]
},
"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"
},
"protocol": {
"properties": {
"conf": {
"description": "protocol-specific configuration",
"type": "object"
},
"logger": {
"items": {
"dependencies": {
"name": [
"conf"
]
},
"properties": {
"conf": {
"description": "logger plugin configuration",
"type": "object"
},
"filter": {
"description": "logger filter rules",
"type": "array"
},
"name": {
"type": "string"
}
}
},
"type": "array"
},
"name": {
"type": "string"
},
"superior_id": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_.]+$",
"type": "string"
},
{
"minimum": 1,
"type": "integer"
}
]
}
},
"required": [
"name"
],
"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": 0,
"type": "integer"
}
},
"type": "object"
},
"type": {
"default": "http",
"enum": [
"http",
"https",
"tcp"
],
"type": "string"
},
"unhealthy": {
"properties": {
"http_failures": {
"default": 5,
"maximum": 254,
"minimum": 0,
"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": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
"minimum": 0,
"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": [
"