File tree Expand file tree Collapse file tree 4 files changed +27
-31
lines changed Expand file tree Collapse file tree 4 files changed +27
-31
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,10 @@ type swaggerResponseOAuth2Application struct {
1414 // in:body
1515 Body api.OAuth2Application `json:"body"`
1616}
17+
18+ // AccessToken represents an API access token.
19+ // swagger:response AccessToken
20+ type swaggerResponseAccessToken struct {
21+ // in:body
22+ Body api.AccessToken `json:"body"`
23+ }
Original file line number Diff line number Diff line change @@ -164,6 +164,9 @@ type swaggerParameterBodies struct {
164164 // in:body
165165 CreateTagOption api.CreateTagOption
166166
167+ // in:body
168+ CreateAccessTokenOption api.CreateAccessTokenOption
169+
167170 // in:body
168171 UserSettingsOptions api.UserSettingsOptions
169172}
Original file line number Diff line number Diff line change @@ -76,15 +76,10 @@ func CreateAccessToken(ctx *context.APIContext) {
7676 // description: username of user
7777 // type: string
7878 // required: true
79- // - name: accessToken
79+ // - name: userCreateToken
8080 // in: body
8181 // schema:
82- // type: object
83- // required:
84- // - name
85- // properties:
86- // name:
87- // type: string
82+ // "$ref": "#/definitions/CreateAccessTokenOption"
8883 // responses:
8984 // "201":
9085 // "$ref": "#/responses/AccessToken"
Original file line number Diff line number Diff line change @@ -11917,18 +11917,10 @@
1191711917 "required": true
1191811918 },
1191911919 {
11920- "name": "accessToken ",
11920+ "name": "userCreateToken ",
1192111921 "in": "body",
1192211922 "schema": {
11923- "type": "object",
11924- "required": [
11925- "name"
11926- ],
11927- "properties": {
11928- "name": {
11929- "type": "string"
11930- }
11931- }
11923+ "$ref": "#/definitions/CreateAccessTokenOption"
1193211924 }
1193311925 }
1193411926 ],
1265412646 },
1265512647 "x-go-package": "code.gitea.io/gitea/modules/structs"
1265612648 },
12649+ "CreateAccessTokenOption": {
12650+ "description": "CreateAccessTokenOption options when create access token",
12651+ "type": "object",
12652+ "properties": {
12653+ "name": {
12654+ "type": "string",
12655+ "x-go-name": "Name"
12656+ }
12657+ },
12658+ "x-go-package": "code.gitea.io/gitea/modules/structs"
12659+ },
1265712660 "CreateBranchProtectionOption": {
1265812661 "description": "CreateBranchProtectionOption options for creating a branch protection",
1265912662 "type": "object",
1704417047 "responses": {
1704517048 "AccessToken": {
1704617049 "description": "AccessToken represents an API access token.",
17047- "headers": {
17048- "id": {
17049- "type": "integer",
17050- "format": "int64"
17051- },
17052- "name": {
17053- "type": "string"
17054- },
17055- "sha1": {
17056- "type": "string"
17057- },
17058- "token_last_eight": {
17059- "type": "string"
17060- }
17050+ "schema": {
17051+ "$ref": "#/definitions/AccessToken"
1706117052 }
1706217053 },
1706317054 "AccessTokenList": {
You can’t perform that action at this time.
0 commit comments