Skip to content

Commit 0376c09

Browse files
authored
Update token creation API swagger documentation (#34288)
Fix #34231
1 parent bf8f111 commit 0376c09

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

modules/structs/user_app.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ type AccessToken struct {
2323
type AccessTokenList []*AccessToken
2424

2525
// CreateAccessTokenOption options when create access token
26+
// swagger:model CreateAccessTokenOption
2627
type CreateAccessTokenOption struct {
2728
// required: true
28-
Name string `json:"name" binding:"Required"`
29+
Name string `json:"name" binding:"Required"`
30+
// example: ["all", "read:activitypub","read:issue", "write:misc", "read:notification", "read:organization", "read:package", "read:repository", "read:user"]
2931
Scopes []string `json:"scopes"`
3032
}
3133

templates/swagger/v1_json.tmpl

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)