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

[Feature]: 给全局 GVA_MODULE (中的ID)加上默认 gin binding(uri/form) #968

Open
pnck opened this issue Mar 20, 2022 · 1 comment
Assignees
Labels

Comments

@pnck
Copy link
Member

pnck commented Mar 20, 2022

功能描述以及必要性描述

当使用一个REST风格路由的时候,如

  • /users/:id/profile/users/1/profile),需要将URI中的id绑定到model中的id上,而这个id是gva_module里定义的通用基础模型,几乎每个自定义model都要包含它
  • 目前我的写法是手动提取 context 里的 id parameter,但我又想在其它模型中直接使用 uri:"some_string_id" 这样的机制自动绑定,两种实现共存就会显得很割裂

因为不是个 major feature request 所以可以酌情考虑与validator一起重构的时候加上。现在的validator也几乎没用

建议和方案

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@pnck and others