hertz icon indicating copy to clipboard operation
hertz copied to clipboard

fix(binding): fix default tag overriding JSON values in anonymous struct

Open FlameMida opened this issue 1 month ago • 1 comments

What type of PR is this?

fix: fix default tag overriding JSON values in anonymous struct

Check the PR title.

  • [x] This PR title match the format: <type>(optional scope): <description>
  • [x] The description of this PR title is user-oriented and clear enough for others to understand.
  • [x] 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. Anonymous embedded struct fields had incorrect JSONName (e.g., "PageInfo.page" instead of "page"), causing keyExist() to fail
  2. Default values from form/query tags were overriding JSON-provided values

zh(optional):

  1. 匿名嵌入结构体的字段JSONName构造错误(如"PageInfo.page"应为"page"),导致keyExist()判断失败
  2. form/query标签的默认值会覆盖JSON提供的值

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

Fixes #1454

(Optional) The PR that updates user documentation:

FlameMida avatar Nov 20 '25 08:11 FlameMida

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 20 '25 08:11 CLAassistant