template-monorepo/internal
王性驊 4590f1c951 docs(api): group OpenAPI by tags + add Chinese field descriptions and enums
Make the generated docs/openapi/gateway.yaml usable by adding three things
go-doc parses out of the .api source:

- @server tags + summary on every block → Swagger UI groups endpoints
  (Auth / Member / Permission / Normal) instead of dumping everything
  under "default".
- backtick end-of-line // 中文 on every Request field → property
  descriptions in the schema. go-doc only reads the trailing comment,
  not the line above, so all comments are placed on the same line as
  the tag.
- options=A|B|C in json/form tags wherever validate:"oneof=..." exists
  → enum dropdowns. The validate tag is kept for runtime validation;
  go-zero also enforces options= at bind time.

Codify the rules in generate/api/README.md (tags / 行末註解 / options=)
and add AGENTS.md at repo root so any AI agent (Claude / Cursor / Codex)
picks them up automatically when working on the project.

types.go regenerated via make gen-api to keep json tags in sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 17:15:25 +08:00
..
config feat(permission): add RBAC module with Casbin enforcement and policy reload 2026-05-21 16:47:35 +08:00
handler feat(permission): add RBAC module with Casbin enforcement and policy reload 2026-05-21 16:47:35 +08:00
library feat(permission): add RBAC module with Casbin enforcement and policy reload 2026-05-21 16:47:35 +08:00
logic feat(permission): add RBAC module with Casbin enforcement and policy reload 2026-05-21 16:47:35 +08:00
middleware feat(permission): add RBAC module with Casbin enforcement and policy reload 2026-05-21 16:47:35 +08:00
model feat(permission): add RBAC module with Casbin enforcement and policy reload 2026-05-21 16:47:35 +08:00
response feat(auth): add unified registration/login module with Zitadel + lint cleanup 2026-05-21 14:45:35 +08:00
svc feat(permission): add RBAC module with Casbin enforcement and policy reload 2026-05-21 16:47:35 +08:00
types docs(api): group OpenAPI by tags + add Chinese field descriptions and enums 2026-05-21 17:15:25 +08:00
worker/notification_retry add notification and member modules with local dev stack 2026-05-20 15:01:08 +08:00