diff --git a/httpclient/mesh/mesh.go b/httpclient/mesh/mesh.go index 20b1e0c..daf39d3 100644 --- a/httpclient/mesh/mesh.go +++ b/httpclient/mesh/mesh.go @@ -83,8 +83,9 @@ func (c *client) Request() *Response { respByte := serialize.JSON.MarshalForByteIgnoreError(c.resp.AliasResultTable) fieldList := make([]validate.StructField, 0) for _, item := range c.reqCfg.ResultRule { + pathArr := strings.Split(item.DataPath, ".") fieldList = append(fieldList, validate.StructField{ - JsonTag: "", + JsonTag: pathArr[len(pathArr)-1], Type: item.DataType, Required: false, RuleList: nil,