humingcheng commented on a change in pull request #124: Support parameter 
validation
URL: https://github.com/apache/servicecomb-kie/pull/124#discussion_r398261445
 
 

 ##########
 File path: pkg/model/db_schema.go
 ##########
 @@ -31,19 +31,19 @@ type LabelDoc struct {
 type KVDoc struct {
        ID             string `json:"id,omitempty" bson:"id,omitempty" 
yaml:"id,omitempty" swag:"string"`
        LabelID        string `json:"label_id,omitempty" 
bson:"label_id,omitempty" yaml:"label_id,omitempty"`
-       Key            string `json:"key" yaml:"key"`
-       Value          string `json:"value,omitempty" yaml:"value,omitempty"`
-       ValueType      string `json:"value_type,omitempty" 
bson:"value_type,omitempty" yaml:"value_type,omitempty"` 
//ini,json,text,yaml,properties
-       Checker        string `json:"check,omitempty" yaml:"check,omitempty"`   
                                    //python script
+       Key            string `json:"key" yaml:"key" validate:"kieKey"`
+       Value          string `json:"value,omitempty" yaml:"value,omitempty" 
validate:"ascii,min=1,max=2097152"`
+       ValueType      string `json:"value_type,omitempty" 
bson:"value_type,omitempty" yaml:"value_type,omitempty" 
validate:"kieValueType"` //ini,json,text,yaml,properties
 
 Review comment:
   已修改

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to