update swagger info (#9558)
This commit is contained in:
parent
27757714d0
commit
655aea13a5
2 changed files with 21 additions and 10 deletions
|
@ -34,13 +34,17 @@ type Hook struct {
|
||||||
// HookList represents a list of API hook.
|
// HookList represents a list of API hook.
|
||||||
type HookList []*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
|
// CreateHookOption options when create a hook
|
||||||
type CreateHookOption struct {
|
type CreateHookOption struct {
|
||||||
// required: true
|
// required: true
|
||||||
// enum: gitea,gogs,slack,discord
|
// enum: dingtalk,discord,gitea,gogs,msteams,slack,telegram
|
||||||
Type string `json:"type" binding:"Required"`
|
Type string `json:"type" binding:"Required"`
|
||||||
// required: true
|
// required: true
|
||||||
Config map[string]string `json:"config" binding:"Required"`
|
Config CreateHookOptionConfig `json:"config" binding:"Required"`
|
||||||
Events []string `json:"events"`
|
Events []string `json:"events"`
|
||||||
BranchFilter string `json:"branch_filter" binding:"GlobPattern"`
|
BranchFilter string `json:"branch_filter" binding:"GlobPattern"`
|
||||||
// default: false
|
// default: false
|
||||||
|
|
|
@ -8609,11 +8609,7 @@
|
||||||
"x-go-name": "BranchFilter"
|
"x-go-name": "BranchFilter"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"type": "object",
|
"$ref": "#/definitions/CreateHookOptionConfig"
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"x-go-name": "Config"
|
|
||||||
},
|
},
|
||||||
"events": {
|
"events": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -8625,16 +8621,27 @@
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
"dingtalk",
|
||||||
|
"discord",
|
||||||
"gitea",
|
"gitea",
|
||||||
"gogs",
|
"gogs",
|
||||||
|
"msteams",
|
||||||
"slack",
|
"slack",
|
||||||
"discord"
|
"telegram"
|
||||||
],
|
],
|
||||||
"x-go-name": "Type"
|
"x-go-name": "Type"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||||
},
|
},
|
||||||
|
"CreateHookOptionConfig": {
|
||||||
|
"description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||||
|
},
|
||||||
"CreateIssueCommentOption": {
|
"CreateIssueCommentOption": {
|
||||||
"description": "CreateIssueCommentOption options for creating a comment on an issue",
|
"description": "CreateIssueCommentOption options for creating a comment on an issue",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
Reference in a new issue