fix: add missing swagger tags

This commit is contained in:
dineshsalunke 2024-01-17 20:16:37 +05:30
parent aa32ad74af
commit 81c3d0ce34
3 changed files with 58 additions and 1 deletions

View File

@ -5,6 +5,7 @@ package structs
import "time" import "time"
// swagger:model
type NewProjectPayload struct { type NewProjectPayload struct {
// required:true // required:true
Title string `json:"title" binding:"Required"` Title string `json:"title" binding:"Required"`
@ -15,6 +16,7 @@ type NewProjectPayload struct {
Description string `json:"description"` Description string `json:"description"`
} }
// swagger:model
type UpdateProjectPayload struct { type UpdateProjectPayload struct {
// required:true // required:true
Title string `json:"title" binding:"Required"` Title string `json:"title" binding:"Required"`

View File

@ -190,4 +190,10 @@ type swaggerParameterBodies struct {
// in:body // in:body
CreateOrUpdateSecretOption api.CreateOrUpdateSecretOption CreateOrUpdateSecretOption api.CreateOrUpdateSecretOption
// in:body
NewProjectPayload api.NewProjectPayload
// in:body
UpdateProjectPayload api.UpdateProjectPayload
} }

View File

@ -21119,6 +21119,35 @@
}, },
"x-go-package": "code.gitea.io/gitea/modules/structs" "x-go-package": "code.gitea.io/gitea/modules/structs"
}, },
"NewProjectPayload": {
"type": "object",
"required": [
"title",
"board_type",
"card_type"
],
"properties": {
"board_type": {
"type": "integer",
"format": "uint8",
"x-go-name": "BoardType"
},
"card_type": {
"type": "integer",
"format": "uint8",
"x-go-name": "CardType"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"title": {
"type": "string",
"x-go-name": "Title"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"NodeInfo": { "NodeInfo": {
"description": "NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks", "description": "NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks",
"type": "object", "type": "object",
@ -21719,6 +21748,9 @@
"type": "boolean", "type": "boolean",
"x-go-name": "IsClosed" "x-go-name": "IsClosed"
}, },
"owner": {
"$ref": "#/definitions/User"
},
"repository": { "repository": {
"$ref": "#/definitions/RepositoryMeta" "$ref": "#/definitions/RepositoryMeta"
}, },
@ -23111,6 +23143,23 @@
}, },
"x-go-package": "code.gitea.io/gitea/modules/structs" "x-go-package": "code.gitea.io/gitea/modules/structs"
}, },
"UpdateProjectPayload": {
"type": "object",
"required": [
"title"
],
"properties": {
"description": {
"type": "string",
"x-go-name": "Description"
},
"title": {
"type": "string",
"x-go-name": "Title"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"UpdateRepoAvatarOption": { "UpdateRepoAvatarOption": {
"description": "UpdateRepoAvatarUserOption options when updating the repo avatar", "description": "UpdateRepoAvatarUserOption options when updating the repo avatar",
"type": "object", "type": "object",
@ -24462,7 +24511,7 @@
"parameterBodies": { "parameterBodies": {
"description": "parameterBodies", "description": "parameterBodies",
"schema": { "schema": {
"$ref": "#/definitions/CreateOrUpdateSecretOption" "$ref": "#/definitions/UpdateProjectPayload"
} }
}, },
"redirect": { "redirect": {