Skip to content

Commit 4f6d09f

Browse files
GiteaBotlunny
andauthored
Update token creation API swagger documentation (#34288) (#34296)
Backport #34288 by @lunny Fix #34231 Co-authored-by: Lunny Xiao <[email protected]>
1 parent 4e5aca6 commit 4f6d09f

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)