mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-28 19:55:20 +00:00
Backport #34288 by @lunny Fix #34231 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
4e5aca62ee
commit
4f6d09fb68
@ -23,9 +23,11 @@ type AccessToken struct {
|
|||||||
type AccessTokenList []*AccessToken
|
type AccessTokenList []*AccessToken
|
||||||
|
|
||||||
// CreateAccessTokenOption options when create access token
|
// CreateAccessTokenOption options when create access token
|
||||||
|
// swagger:model CreateAccessTokenOption
|
||||||
type CreateAccessTokenOption struct {
|
type CreateAccessTokenOption struct {
|
||||||
// required: true
|
// required: true
|
||||||
Name string `json:"name" binding:"Required"`
|
Name string `json:"name" binding:"Required"`
|
||||||
|
// example: ["all", "read:activitypub","read:issue", "write:misc", "read:notification", "read:organization", "read:package", "read:repository", "read:user"]
|
||||||
Scopes []string `json:"scopes"`
|
Scopes []string `json:"scopes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
templates/swagger/v1_json.tmpl
generated
13
templates/swagger/v1_json.tmpl
generated
@ -19616,7 +19616,18 @@
|
|||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"x-go-name": "Scopes"
|
"x-go-name": "Scopes",
|
||||||
|
"example": [
|
||||||
|
"all",
|
||||||
|
"read:activitypub",
|
||||||
|
"read:issue",
|
||||||
|
"write:misc",
|
||||||
|
"read:notification",
|
||||||
|
"read:organization",
|
||||||
|
"read:package",
|
||||||
|
"read:repository",
|
||||||
|
"read:user"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||||
|
Loading…
Reference in New Issue
Block a user