mirror of
https://github.com/go-gitea/gitea
synced 2025-08-16 06:28:27 +00:00
Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239)
The images used by Gitea's drone pipeline were upgraded to Go 1.19.x It causes the lint fails because Go 1.19 uses new code format. This PR partially backport #20758 (including the emoji-data sync), partially fix the format manually.
This commit is contained in:
@@ -7,59 +7,59 @@
|
||||
//
|
||||
// This documentation describes the Gitea API.
|
||||
//
|
||||
// Schemes: http, https
|
||||
// BasePath: /api/v1
|
||||
// Version: {{AppVer | JSEscape | Safe}}
|
||||
// License: MIT http://opensource.org/licenses/MIT
|
||||
// Schemes: http, https
|
||||
// BasePath: /api/v1
|
||||
// Version: {{AppVer | JSEscape | Safe}}
|
||||
// License: MIT http://opensource.org/licenses/MIT
|
||||
//
|
||||
// Consumes:
|
||||
// - application/json
|
||||
// - text/plain
|
||||
// Consumes:
|
||||
// - application/json
|
||||
// - text/plain
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - text/html
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - text/html
|
||||
//
|
||||
// Security:
|
||||
// - BasicAuth :
|
||||
// - Token :
|
||||
// - AccessToken :
|
||||
// - AuthorizationHeaderToken :
|
||||
// - SudoParam :
|
||||
// - SudoHeader :
|
||||
// - TOTPHeader :
|
||||
// Security:
|
||||
// - BasicAuth :
|
||||
// - Token :
|
||||
// - AccessToken :
|
||||
// - AuthorizationHeaderToken :
|
||||
// - SudoParam :
|
||||
// - SudoHeader :
|
||||
// - TOTPHeader :
|
||||
//
|
||||
// SecurityDefinitions:
|
||||
// BasicAuth:
|
||||
// type: basic
|
||||
// Token:
|
||||
// type: apiKey
|
||||
// name: token
|
||||
// in: query
|
||||
// AccessToken:
|
||||
// type: apiKey
|
||||
// name: access_token
|
||||
// in: query
|
||||
// AuthorizationHeaderToken:
|
||||
// type: apiKey
|
||||
// name: Authorization
|
||||
// in: header
|
||||
// description: API tokens must be prepended with "token" followed by a space.
|
||||
// SudoParam:
|
||||
// type: apiKey
|
||||
// name: sudo
|
||||
// in: query
|
||||
// description: Sudo API request as the user provided as the key. Admin privileges are required.
|
||||
// SudoHeader:
|
||||
// type: apiKey
|
||||
// name: Sudo
|
||||
// in: header
|
||||
// description: Sudo API request as the user provided as the key. Admin privileges are required.
|
||||
// TOTPHeader:
|
||||
// type: apiKey
|
||||
// name: X-GITEA-OTP
|
||||
// in: header
|
||||
// description: Must be used in combination with BasicAuth if two-factor authentication is enabled.
|
||||
// SecurityDefinitions:
|
||||
// BasicAuth:
|
||||
// type: basic
|
||||
// Token:
|
||||
// type: apiKey
|
||||
// name: token
|
||||
// in: query
|
||||
// AccessToken:
|
||||
// type: apiKey
|
||||
// name: access_token
|
||||
// in: query
|
||||
// AuthorizationHeaderToken:
|
||||
// type: apiKey
|
||||
// name: Authorization
|
||||
// in: header
|
||||
// description: API tokens must be prepended with "token" followed by a space.
|
||||
// SudoParam:
|
||||
// type: apiKey
|
||||
// name: sudo
|
||||
// in: query
|
||||
// description: Sudo API request as the user provided as the key. Admin privileges are required.
|
||||
// SudoHeader:
|
||||
// type: apiKey
|
||||
// name: Sudo
|
||||
// in: header
|
||||
// description: Sudo API request as the user provided as the key. Admin privileges are required.
|
||||
// TOTPHeader:
|
||||
// type: apiKey
|
||||
// name: X-GITEA-OTP
|
||||
// in: header
|
||||
// description: Must be used in combination with BasicAuth if two-factor authentication is enabled.
|
||||
//
|
||||
// swagger:meta
|
||||
package v1
|
||||
|
@@ -34,7 +34,7 @@ func GetGitAllRefs(ctx *context.APIContext) {
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Reference"
|
||||
// # "$ref": "#/responses/Reference" TODO: swagger doesnt support different output formats by ref
|
||||
// "$ref": "#/responses/ReferenceList"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
@@ -67,7 +67,7 @@ func GetGitRefs(ctx *context.APIContext) {
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Reference"
|
||||
// # "$ref": "#/responses/Reference" TODO: swagger doesnt support different output formats by ref
|
||||
// "$ref": "#/responses/ReferenceList"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
@@ -566,6 +566,8 @@ func ListMyTrackedTimes(ctx *context.APIContext) {
|
||||
// swagger:operation GET /user/times user userCurrentTrackedTimes
|
||||
// ---
|
||||
// summary: List the current user's tracked times
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: page
|
||||
// in: query
|
||||
@@ -575,9 +577,6 @@ func ListMyTrackedTimes(ctx *context.APIContext) {
|
||||
// in: query
|
||||
// description: page size of results
|
||||
// type: integer
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: since
|
||||
// in: query
|
||||
// description: Only show times updated after the given time. This is a timestamp in RFC 3339 format
|
||||
|
@@ -585,7 +585,6 @@ func Edit(ctx *context.APIContext) {
|
||||
// description: name of the repo to edit
|
||||
// type: string
|
||||
// required: true
|
||||
// required: true
|
||||
// - name: body
|
||||
// in: body
|
||||
// description: "Properties of a repo that you can edit"
|
||||
|
@@ -48,11 +48,6 @@ func AddEmail(ctx *context.APIContext) {
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: options
|
||||
// in: body
|
||||
// schema:
|
||||
// "$ref": "#/definitions/CreateEmailOption"
|
||||
// parameters:
|
||||
// - name: body
|
||||
// in: body
|
||||
// schema:
|
||||
|
Reference in New Issue
Block a user