You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/22 03:13:47 UTC

[GitHub] [apisix-dashboard] starsz commented on a change in pull request #1909: chore: sync JSON Schema from APISIX 2.6

starsz commented on a change in pull request #1909:
URL: https://github.com/apache/apisix-dashboard/pull/1909#discussion_r637345600



##########
File path: api/internal/core/entity/entity.go
##########
@@ -208,17 +209,18 @@ type Consumer struct {
 // swagger:model SSL
 type SSL struct {
 	BaseInfo
-	Cert          string            `json:"cert,omitempty"`
-	Key           string            `json:"key,omitempty"`
-	Sni           string            `json:"sni,omitempty"`
-	Snis          []string          `json:"snis,omitempty"`
-	Certs         []string          `json:"certs,omitempty"`
-	Keys          []string          `json:"keys,omitempty"`
-	ExpTime       int64             `json:"exptime,omitempty"`
-	Status        int               `json:"status"`
-	ValidityStart int64             `json:"validity_start,omitempty"`
-	ValidityEnd   int64             `json:"validity_end,omitempty"`
-	Labels        map[string]string `json:"labels,omitempty"`
+	Cert          string                 `json:"cert,omitempty"`
+	Key           string                 `json:"key,omitempty"`
+	Sni           string                 `json:"sni,omitempty"`
+	Snis          []string               `json:"snis,omitempty"`
+	Certs         []string               `json:"certs,omitempty"`
+	Keys          []string               `json:"keys,omitempty"`
+	ExpTime       int64                  `json:"exptime,omitempty"`
+	Status        int                    `json:"status"`
+	ValidityStart int64                  `json:"validity_start,omitempty"`
+	ValidityEnd   int64                  `json:"validity_end,omitempty"`
+	Labels        map[string]string      `json:"labels,omitempty"`
+	Client        map[string]interface{} `json:"client,omitempty"`

Review comment:
       Why set Client type to `map[string]interface{}` ?

##########
File path: api/internal/core/entity/entity.go
##########
@@ -157,21 +157,22 @@ type HealthChecker struct {
 }
 
 type UpstreamDef struct {
-	Nodes         interface{}       `json:"nodes,omitempty"`
-	Retries       int               `json:"retries,omitempty"`
-	Timeout       interface{}       `json:"timeout,omitempty"`
-	Type          string            `json:"type,omitempty"`
-	Checks        interface{}       `json:"checks,omitempty"`
-	HashOn        string            `json:"hash_on,omitempty"`
-	Key           string            `json:"key,omitempty"`
-	Scheme        string            `json:"scheme,omitempty"`
-	DiscoveryType string            `json:"discovery_type,omitempty"`
-	PassHost      string            `json:"pass_host,omitempty"`
-	UpstreamHost  string            `json:"upstream_host,omitempty"`
-	Name          string            `json:"name,omitempty"`
-	Desc          string            `json:"desc,omitempty"`
-	ServiceName   string            `json:"service_name,omitempty"`
-	Labels        map[string]string `json:"labels,omitempty"`
+	Nodes         interface{}            `json:"nodes,omitempty"`
+	Retries       int                    `json:"retries,omitempty"`
+	Timeout       interface{}            `json:"timeout,omitempty"`
+	Type          string                 `json:"type,omitempty"`
+	Checks        interface{}            `json:"checks,omitempty"`
+	HashOn        string                 `json:"hash_on,omitempty"`
+	Key           string                 `json:"key,omitempty"`
+	Scheme        string                 `json:"scheme,omitempty"`
+	DiscoveryType string                 `json:"discovery_type,omitempty"`
+	PassHost      string                 `json:"pass_host,omitempty"`
+	UpstreamHost  string                 `json:"upstream_host,omitempty"`
+	Name          string                 `json:"name,omitempty"`
+	Desc          string                 `json:"desc,omitempty"`
+	ServiceName   string                 `json:"service_name,omitempty"`
+	Labels        map[string]string      `json:"labels,omitempty"`
+	TLS           map[string]interface{} `json:"tls,omitempty"`

Review comment:
       Ditto.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org