mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-30 20:24:01 +00:00
refactor: use default error response for swagger (#40048)
ref: https://github.com/go-gitea/gitea/pull/39942#discussion_r4393487959
This commit is contained in:
1 parent
30e5ef4228
commit
5671c5192d
93 files changed
+2600
-6894
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user