tianxiaoliang commented on a change in pull request #124: Support parameter
validation
URL: https://github.com/apache/servicecomb-kie/pull/124#discussion_r397670870
##########
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:
kieValueType改成 valueType
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services