Go 1.19 format (#20758)
* 1.19 gofumpt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change CSV test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Commit whitespace fixes from @zeripath Co-authored-by: zeripath <art27@cantab.net> * Update emoji Signed-off-by: jolheiser <john.olheiser@gmail.com> * bump swagger & fix generate-swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
3edc14b687
commit
a48d6ba4b4
23 changed files with 626 additions and 578 deletions
|
@ -98,7 +98,6 @@ func PersonInbox(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -584,7 +584,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue