This is an automated email from the ASF dual-hosted git repository. liuxiran pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 91ad26b chore: sync JSON Schema from APISIX 2.6 (#1909)
91ad26b is described below
commit 91ad26be6dcda1813419b51bc9d0203c86a1d5d0
Author: nic-chen <[email protected]>
AuthorDate: Sat May 22 15:43:42 2021 +0800
chore: sync JSON Schema from APISIX 2.6 (#1909)
---
api/conf/schema.json | 138 +++++++++++++++++++++++++++++++++++--
api/internal/core/entity/entity.go | 12 ++++
2 files changed, 143 insertions(+), 7 deletions(-)
diff --git a/api/conf/schema.json b/api/conf/schema.json
index ff58ff4..9fbd996 100644
--- a/api/conf/schema.json
+++ b/api/conf/schema.json
@@ -724,6 +724,22 @@
"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",
"enum": ["chash",
"ewma", "least_conn", "roundrobin"],
@@ -1149,6 +1165,22 @@
"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",
"enum": ["chash",
"ewma", "least_conn", "roundrobin"],
@@ -1199,6 +1231,22 @@
},
"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"
},
@@ -1670,6 +1718,22 @@
"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",
"enum": ["chash",
"ewma", "least_conn", "roundrobin"],
@@ -2023,6 +2087,22 @@
"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",
"enum": ["chash", "ewma", "least_conn",
"roundrobin"],
@@ -2328,6 +2408,7 @@
"properties": {
"methods": {
"items": {
+
"description": "HTTP method",
"enum": ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
"TRACE"],
"type": "string"
},
@@ -3073,6 +3154,11 @@
"default": "kafka logger",
"type": "string"
},
+ "producer_type": {
+ "default": "async",
+ "enum": ["async", "sync"],
+ "type": "string"
+ },
"retry_delay": {
"default": 1,
"minimum": 0,
@@ -3107,6 +3193,10 @@
"properties": {
"disable": {
"type": "boolean"
+ },
+ "header": {
+ "default": "apikey",
+ "type": "string"
}
},
"type": "object"
@@ -3197,6 +3287,9 @@
"policy": {
"enum":
["redis-cluster"]
},
+
"redis_cluster_name": {
+ "type":
"string"
+ },
"redis_cluster_nodes": {
"items": {
"maxLength": 100,
@@ -3216,7 +3309,7 @@
"type":
"integer"
}
},
- "required":
["redis_cluster_nodes"]
+ "required":
["redis_cluster_name", "redis_cluster_nodes"]
}]
}
},
@@ -3439,6 +3532,10 @@
"properties": {
"disable": {
"type": "boolean"
+ },
+ "prefer_name": {
+ "default": false,
+ "type": "boolean"
}
},
"type": "object"
@@ -3483,7 +3580,7 @@
"cache_method": {
"default": ["GET", "HEAD"],
"items": {
- "description": "http
method",
+ "description": "HTTP
method",
"enum": ["CONNECT",
"DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"],
"type": "string"
},
@@ -3590,15 +3687,31 @@
"oneOf": [{
"required": ["uri"]
}, {
+ "required": ["regex_uri"]
+ }, {
"required": ["http_to_https"]
}],
"properties": {
"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,
@@ -4066,11 +4179,6 @@
"additionalProperties":
false,
"properties": {
"match": {
-
"default": [{
-
"vars": [
-
[0, ">", "server_port"]
-
]
- }],
"items": {
"properties": {
"vars": {
@@ -4411,6 +4519,22 @@
"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",
"enum": ["chash", "ewma", "least_conn",
"roundrobin"],
diff --git a/api/internal/core/entity/entity.go
b/api/internal/core/entity/entity.go
index b81c7f4..272020b 100644
--- a/api/internal/core/entity/entity.go
+++ b/api/internal/core/entity/entity.go
@@ -156,6 +156,11 @@ type HealthChecker struct {
Passive Passive `json:"passive,omitempty"`
}
+type UpstreamTLS struct {
+ ClientCert string `json:"client_cert,omitempty"`
+ ClientKey string `json:"client_key,omitempty"`
+}
+
type UpstreamDef struct {
Nodes interface{} `json:"nodes,omitempty"`
Retries int `json:"retries,omitempty"`
@@ -172,6 +177,7 @@ type UpstreamDef struct {
Desc string `json:"desc,omitempty"`
ServiceName string `json:"service_name,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
+ TLS *UpstreamTLS `json:"tls,omitempty"`
}
// swagger:model Upstream
@@ -205,6 +211,11 @@ type Consumer struct {
UpdateTime int64 `json:"update_time,omitempty"`
}
+type SSLClient struct {
+ CA string `json:"ca,omitempty"`
+ Depth int `json:"depth,omitempty"`
+}
+
// swagger:model SSL
type SSL struct {
BaseInfo
@@ -219,6 +230,7 @@ type SSL struct {
ValidityStart int64 `json:"validity_start,omitempty"`
ValidityEnd int64 `json:"validity_end,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
+ Client *SSLClient `json:"client,omitempty"`
}
// swagger:model Service
