cloudwego / hertz

Go HTTP framework with high-performance and strong-extensibility for building micro-services.
https://www.cloudwego.io
Apache License 2.0
5.04k stars 491 forks source link

fix(hz): rm_tag for default json #1140

Open FGYFFFF opened 2 months ago

FGYFFFF commented 2 months ago

What type of PR is this?

fix

Check the PR title.

(Optional) Translate the PR title into Chinese.

解决 rm_tag 无法删除默认的 json tag 的问题

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: rm_tag for default json zh(optional): 解决 rm_tag 无法删除默认的 json tag 的问题 用户使用 rm_tag=json 的时候,无法删除掉写注解字段的默认 json tag

struct HelloReq {
    1: string Name (api.query="name"); 
}

理论上应该生成如下

type HelloReq struct {
    Name string `thrift:"Name,1" query:"name" `
}

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.81%. Comparing base (9162dd1) to head (c299e85). Report is 9 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1140 +/- ## =========================================== + Coverage 82.75% 82.81% +0.06% =========================================== Files 98 98 Lines 10044 10062 +18 =========================================== + Hits 8312 8333 +21 + Misses 1241 1238 -3 Partials 491 491 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.