Skip to content

Commit 781b1cc

Browse files
committed
refactor(project): fix some swagger errors
1 parent ce3dbfd commit 781b1cc

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

routers/api/v1/repo/project.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func CreateProject(ctx *context.APIContext) {
3232
// - name: body
3333
// in: body
3434
// schema:
35-
// "$ref": "#/definitions/CreateProjectPayload"
35+
// "$ref": "#/definitions/UpsertProjectPayload"
3636
// responses:
3737
// "201":
3838
// "$ref": "#/responses/Project"
@@ -251,8 +251,6 @@ func GetProjectBoard(ctx *context.APIContext) {
251251
// swagger:operation GET /repos/{owner}/{repo}/projects/{projectId}/boards/{id} repository repoGetProjectBoard
252252
// ---
253253
// summary: Create a board
254-
// consumes:
255-
// - application/json
256254
// produces:
257255
// - application/json
258256
// parameters:
@@ -271,7 +269,6 @@ func GetProjectBoard(ctx *context.APIContext) {
271269
// description: project id
272270
// type: string
273271
// required: true
274-
// - name: body
275272
// - name: id
276273
// in: path
277274
// description: project id
@@ -319,8 +316,6 @@ func DeleteProjectBoard(ctx *context.APIContext) {
319316
// swagger:operation DELETE /repos/{owner}/{repo}/projects/{projectId}/boards/{id} repository repoDeleteProjectBoard
320317
// ---
321318
// summary: Delete project board
322-
// consumes:
323-
// - application/json
324319
// produces:
325320
// - application/json
326321
// parameters:

templates/swagger/v1_json.tmpl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7725,7 +7725,7 @@
77257725
"name": "body",
77267726
"in": "body",
77277727
"schema": {
7728-
"$ref": "#/definitions/CreateProjectPayload"
7728+
"$ref": "#/definitions/UpsertProjectPayload"
77297729
}
77307730
}
77317731
],
@@ -7981,9 +7981,6 @@
79817981
},
79827982
"/repos/{owner}/{repo}/projects/{projectId}/boards/{id}": {
79837983
"get": {
7984-
"consumes": [
7985-
"application/json"
7986-
],
79877984
"produces": [
79887985
"application/json"
79897986
],
@@ -8014,9 +8011,6 @@
80148011
"in": "path",
80158012
"required": true
80168013
},
8017-
{
8018-
"name": "body"
8019-
},
80208014
{
80218015
"type": "string",
80228016
"description": "project id",
@@ -8035,9 +8029,6 @@
80358029
}
80368030
},
80378031
"delete": {
8038-
"consumes": [
8039-
"application/json"
8040-
],
80418032
"produces": [
80428033
"application/json"
80438034
],

0 commit comments

Comments
 (0)