Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hz): fix some problems with hz client code #1053

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

Skyenought
Copy link
Contributor

@Skyenought Skyenought commented Jan 23, 2024

What type of PR is this?

fix

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

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

en:

  1. Assert all 'api.any' to 'api.post' when generate client code
  2. Add addHeaders() method to prevent the generated code from failing to compile

zh(optional):

  1. 在hz client 生成文件时, 将 api.any 全部转换为 api.post 注解
  2. 增加 addHeaders() 方法,防止生成代码无法通过编译

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

(Optional) The PR that updates user documentation:

cloudwego/cloudwego.github.io#939

@Skyenought Skyenought requested review from a team as code owners January 23, 2024 16:47
cmd/hz/generator/client.go Outdated Show resolved Hide resolved
@Skyenought
Copy link
Contributor Author

image
genClient 不是只有在 client 命令下才执行的嘛😂

@Skyenought
Copy link
Contributor Author

@FGYFFFF

cmd/hz/generator/client.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0d25abe) 82.49% compared to head (171b252) 82.54%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1053      +/-   ##
===========================================
+ Coverage    82.49%   82.54%   +0.04%     
===========================================
  Files           98       98              
  Lines        10025    10025              
===========================================
+ Hits          8270     8275       +5     
+ Misses        1258     1254       -4     
+ Partials       497      496       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Skyenought Skyenought force-pushed the _client branch 3 times, most recently from d9fe9b2 to 9d8823c Compare January 26, 2024 11:12
@FGYFFFF FGYFFFF changed the title feat(hz): Assert all 'api.any' to 'api.post' when generate client code feat(hz): fix some problems with hz client code Jan 29, 2024
@FGYFFFF FGYFFFF changed the title feat(hz): fix some problems with hz client code fix(hz): fix some problems with hz client code Jan 29, 2024
@Skyenought Skyenought closed this Jan 29, 2024
@Skyenought Skyenought reopened this Jan 29, 2024
@Skyenought
Copy link
Contributor Author

不好意思, 手快了

@FGYFFFF FGYFFFF merged commit 0619701 into cloudwego:develop Jan 30, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants