mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-20 08:50:21 +00:00
Improve Swagger documentation for user endpoints
This commit is contained in:
parent
1316f4d338
commit
b074e08f34
23 changed files with 703 additions and 2 deletions
|
@ -32,6 +32,10 @@ func ListHooks(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/HookList"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
utils.ListOwnerHooks(
|
||||
ctx,
|
||||
|
@ -56,6 +60,10 @@ func GetHook(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Hook"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
hook, err := utils.GetOwnerHook(ctx, ctx.Doer.ID, ctx.ParamsInt64("id"))
|
||||
if err != nil {
|
||||
|
@ -93,6 +101,10 @@ func CreateHook(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "201":
|
||||
// "$ref": "#/responses/Hook"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
utils.AddOwnerHook(
|
||||
ctx,
|
||||
|
@ -124,6 +136,10 @@ func EditHook(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Hook"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
utils.EditOwnerHook(
|
||||
ctx,
|
||||
|
@ -150,6 +166,10 @@ func DeleteHook(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
utils.DeleteOwnerHook(
|
||||
ctx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue