refactor: use default error response for swagger (#40048)

ref: https://github.com/go-gitea/gitea/pull/39942#discussion_r4393487959
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-10-28 09:05:00 +00:00
1 parent 30e5ef4228
commit 5671c5192d
93 files changed
+2600 -6894

No files matched your search

+2 -2
View File
@@ -140,8 +140,8 @@ breaking v1.
### Adding and maintaining API routes
- All possible results (errors, success, and failure messages) must be documented in
the swagger comments on the route.
- Document success responses in the swagger comments on the route. Replace explicit
error responses with a `default` response referencing `#/responses/error`.
- Every JSON request body must be defined as a struct in `modules/structs/` and
registered in [`routers/api/v1/swagger/options.go`](../routers/api/v1/swagger/options.go).
- Every JSON response must be defined as a struct in `modules/structs/` and