diff options
author | 6543 <6543@obermui.de> | 2019-12-31 05:11:15 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-31 12:11:15 +0800 |
commit | 655aea13a5ad5dd51bcaafd1b96ecce2673f0312 (patch) | |
tree | b9cf101ae33e17e7aae75c52d27baaada6ada7ed /modules/structs | |
parent | 27757714d0420192e6139d1e4206446dcefe6531 (diff) | |
download | gitea-655aea13a5ad5dd51bcaafd1b96ecce2673f0312.tar.gz gitea-655aea13a5ad5dd51bcaafd1b96ecce2673f0312.zip |
update swagger info (#9558)
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/hook.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/structs/hook.go b/modules/structs/hook.go index d62c900f42..7ec46254eb 100644 --- a/modules/structs/hook.go +++ b/modules/structs/hook.go @@ -34,15 +34,19 @@ type Hook struct { // HookList represents a list of API hook. type HookList []*Hook +// CreateHookOptionConfig has all config options in it +// required are "content_type" and "url" Required +type CreateHookOptionConfig map[string]string + // CreateHookOption options when create a hook type CreateHookOption struct { // required: true - // enum: gitea,gogs,slack,discord + // enum: dingtalk,discord,gitea,gogs,msteams,slack,telegram Type string `json:"type" binding:"Required"` // required: true - Config map[string]string `json:"config" binding:"Required"` - Events []string `json:"events"` - BranchFilter string `json:"branch_filter" binding:"GlobPattern"` + Config CreateHookOptionConfig `json:"config" binding:"Required"` + Events []string `json:"events"` + BranchFilter string `json:"branch_filter" binding:"GlobPattern"` // default: false Active bool `json:"active"` } |