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:
@@ -117,12 +117,8 @@ func IsMember(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "204":
|
||||
// description: user is a member
|
||||
// schema:
|
||||
// "$ref": "#/responses/empty"
|
||||
// "404":
|
||||
// description: user is not a member
|
||||
// schema:
|
||||
// "$ref": "#/responses/empty"
|
||||
userToCheck := user.GetUserByParams(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
@@ -172,12 +168,8 @@ func IsPublicMember(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "204":
|
||||
// description: user is a public member
|
||||
// schema:
|
||||
// "$ref": "#/responses/empty"
|
||||
// "404":
|
||||
// description: user is not a public member
|
||||
// schema:
|
||||
// "$ref": "#/responses/empty"
|
||||
userToCheck := user.GetUserByParams(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
@@ -210,8 +202,6 @@ func PublicizeMember(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "204":
|
||||
// description: membership publicized
|
||||
// schema:
|
||||
// "$ref": "#/responses/empty"
|
||||
userToPublicize := user.GetUserByParams(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
@@ -286,8 +276,6 @@ func DeleteMember(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "204":
|
||||
// description: member removed
|
||||
// schema:
|
||||
// "$ref": "#/responses/empty"
|
||||
member := user.GetUserByParams(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
|
Reference in New Issue
Block a user