mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix Swagger JSON autogeneration issues. (#4845)
* Fix Swagger JSON. Remove unnecessary schema references for the forbidden and empty responses Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger API for CreateAccessToken * Fix admin create org swagger * Fix swagger for adminCreateRepo * More swagger fixes Set int64 format for those which are int64 Some more form fixes * Fix swagger description of GET /repos/{owner}/{repo}/pulls
This commit is contained in:
@@ -60,6 +60,15 @@ func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption
|
||||
// description: username of user
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: accessToken
|
||||
// in: body
|
||||
// schema:
|
||||
// type: object
|
||||
// required:
|
||||
// - name
|
||||
// properties:
|
||||
// name:
|
||||
// type: string
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/AccessToken"
|
||||
@@ -95,6 +104,7 @@ func DeleteAccessToken(ctx *context.APIContext) {
|
||||
// in: path
|
||||
// description: token to be deleted
|
||||
// type: integer
|
||||
// format: int64
|
||||
// required: true
|
||||
// responses:
|
||||
// "204":
|
||||
|
@@ -80,6 +80,7 @@ func GetGPGKey(ctx *context.APIContext) {
|
||||
// in: path
|
||||
// description: id of key to get
|
||||
// type: integer
|
||||
// format: int64
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
@@ -143,6 +144,7 @@ func DeleteGPGKey(ctx *context.APIContext) {
|
||||
// in: path
|
||||
// description: id of key to delete
|
||||
// type: integer
|
||||
// format: int64
|
||||
// required: true
|
||||
// responses:
|
||||
// "204":
|
||||
|
@@ -101,6 +101,7 @@ func GetPublicKey(ctx *context.APIContext) {
|
||||
// in: path
|
||||
// description: id of key to get
|
||||
// type: integer
|
||||
// format: int64
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
@@ -172,6 +173,7 @@ func DeletePublicKey(ctx *context.APIContext) {
|
||||
// in: path
|
||||
// description: id of key to delete
|
||||
// type: integer
|
||||
// format: int64
|
||||
// required: true
|
||||
// responses:
|
||||
// "204":
|
||||
|
@@ -31,6 +31,7 @@ func Search(ctx *context.APIContext) {
|
||||
// in: query
|
||||
// description: ID of the user to search for
|
||||
// type: integer
|
||||
// format: int64
|
||||
// - name: limit
|
||||
// in: query
|
||||
// description: maximum number of users to return
|
||||
|
Reference in New Issue
Block a user