aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-12-11 16:37:24 +0300
committerGitHub <noreply@github.com>2023-12-11 16:37:24 +0300
commit34555262c1d6a2dff9e2068019013f700962f13c (patch)
treed6d3c141bcd886592d1cd23bb338bed18595be13
parentfeat: add discussion comment posting (#59) (diff)
downloadlphub-34555262c1d6a2dff9e2068019013f700962f13c.tar.gz
lphub-34555262c1d6a2dff9e2068019013f700962f13c.tar.bz2
lphub-34555262c1d6a2dff9e2068019013f700962f13c.zip
docs: add missing param (#59)
-rw-r--r--backend/handlers/discussions.go1
-rw-r--r--docs/docs.go33
-rw-r--r--docs/swagger.json33
-rw-r--r--docs/swagger.yaml23
4 files changed, 23 insertions, 67 deletions
diff --git a/backend/handlers/discussions.go b/backend/handlers/discussions.go
index 51f5334..04c91d0 100644
--- a/backend/handlers/discussions.go
+++ b/backend/handlers/discussions.go
@@ -189,6 +189,7 @@ func CreateMapDiscussion(c *gin.Context) {
189// @Produce json 189// @Produce json
190// @Param Authorization header string true "JWT Token" 190// @Param Authorization header string true "JWT Token"
191// @Param mapid path int true "Map ID" 191// @Param mapid path int true "Map ID"
192// @Param discussionid path int true "Discussion ID"
192// @Param request body CreateMapDiscussionCommentRequest true "Body" 193// @Param request body CreateMapDiscussionCommentRequest true "Body"
193// @Success 200 {object} models.Response{data=CreateMapDiscussionCommentRequest} 194// @Success 200 {object} models.Response{data=CreateMapDiscussionCommentRequest}
194// @Router /maps/{mapid}/discussions/{discussionid} [post] 195// @Router /maps/{mapid}/discussions/{discussionid} [post]
diff --git a/docs/docs.go b/docs/docs.go
index c2c1bab..fc38d35 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -546,6 +546,13 @@ const docTemplate = `{
546 "required": true 546 "required": true
547 }, 547 },
548 { 548 {
549 "type": "integer",
550 "description": "Discussion ID",
551 "name": "discussionid",
552 "in": "path",
553 "required": true
554 },
555 {
549 "description": "Body", 556 "description": "Body",
550 "name": "request", 557 "name": "request",
551 "in": "body", 558 "in": "body",
@@ -1577,30 +1584,6 @@ const docTemplate = `{
1577 } 1584 }
1578 } 1585 }
1579 }, 1586 },
1580 "handlers.MapDiscussionOnlyTitle": {
1581 "type": "object",
1582 "properties": {
1583 "comments": {
1584 "type": "array",
1585 "items": {
1586 "$ref": "#/definitions/handlers.MapDiscussionComment"
1587 }
1588 },
1589 "creator": {
1590 "$ref": "#/definitions/models.UserShortWithAvatar"
1591 },
1592 "id": {
1593 "type": "integer"
1594 },
1595 "title": {
1596 "type": "string"
1597 },
1598 "updated_at": {
1599 "description": "Upvotes int ` + "`" + `json:\"upvotes\"` + "`" + `",
1600 "type": "string"
1601 }
1602 }
1603 },
1604 "handlers.MapDiscussionResponse": { 1587 "handlers.MapDiscussionResponse": {
1605 "type": "object", 1588 "type": "object",
1606 "properties": { 1589 "properties": {
@@ -1615,7 +1598,7 @@ const docTemplate = `{
1615 "discussions": { 1598 "discussions": {
1616 "type": "array", 1599 "type": "array",
1617 "items": { 1600 "items": {
1618 "$ref": "#/definitions/handlers.MapDiscussionOnlyTitle" 1601 "$ref": "#/definitions/handlers.MapDiscussion"
1619 } 1602 }
1620 } 1603 }
1621 } 1604 }
diff --git a/docs/swagger.json b/docs/swagger.json
index 043fb6b..32efc4b 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -540,6 +540,13 @@
540 "required": true 540 "required": true
541 }, 541 },
542 { 542 {
543 "type": "integer",
544 "description": "Discussion ID",
545 "name": "discussionid",
546 "in": "path",
547 "required": true
548 },
549 {
543 "description": "Body", 550 "description": "Body",
544 "name": "request", 551 "name": "request",
545 "in": "body", 552 "in": "body",
@@ -1571,30 +1578,6 @@
1571 } 1578 }
1572 } 1579 }
1573 }, 1580 },
1574 "handlers.MapDiscussionOnlyTitle": {
1575 "type": "object",
1576 "properties": {
1577 "comments": {
1578 "type": "array",
1579 "items": {
1580 "$ref": "#/definitions/handlers.MapDiscussionComment"
1581 }
1582 },
1583 "creator": {
1584 "$ref": "#/definitions/models.UserShortWithAvatar"
1585 },
1586 "id": {
1587 "type": "integer"
1588 },
1589 "title": {
1590 "type": "string"
1591 },
1592 "updated_at": {
1593 "description": "Upvotes int `json:\"upvotes\"`",
1594 "type": "string"
1595 }
1596 }
1597 },
1598 "handlers.MapDiscussionResponse": { 1581 "handlers.MapDiscussionResponse": {
1599 "type": "object", 1582 "type": "object",
1600 "properties": { 1583 "properties": {
@@ -1609,7 +1592,7 @@
1609 "discussions": { 1592 "discussions": {
1610 "type": "array", 1593 "type": "array",
1611 "items": { 1594 "items": {
1612 "$ref": "#/definitions/handlers.MapDiscussionOnlyTitle" 1595 "$ref": "#/definitions/handlers.MapDiscussion"
1613 } 1596 }
1614 } 1597 }
1615 } 1598 }
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 9de09a3..f3a848f 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -149,22 +149,6 @@ definitions:
149 user: 149 user:
150 $ref: '#/definitions/models.UserShortWithAvatar' 150 $ref: '#/definitions/models.UserShortWithAvatar'
151 type: object 151 type: object
152 handlers.MapDiscussionOnlyTitle:
153 properties:
154 comments:
155 items:
156 $ref: '#/definitions/handlers.MapDiscussionComment'
157 type: array
158 creator:
159 $ref: '#/definitions/models.UserShortWithAvatar'
160 id:
161 type: integer
162 title:
163 type: string
164 updated_at:
165 description: Upvotes int `json:"upvotes"`
166 type: string
167 type: object
168 handlers.MapDiscussionResponse: 152 handlers.MapDiscussionResponse:
169 properties: 153 properties:
170 discussion: 154 discussion:
@@ -174,7 +158,7 @@ definitions:
174 properties: 158 properties:
175 discussions: 159 discussions:
176 items: 160 items:
177 $ref: '#/definitions/handlers.MapDiscussionOnlyTitle' 161 $ref: '#/definitions/handlers.MapDiscussion'
178 type: array 162 type: array
179 type: object 163 type: object
180 handlers.MapLeaderboardsResponse: 164 handlers.MapLeaderboardsResponse:
@@ -792,6 +776,11 @@ paths:
792 name: mapid 776 name: mapid
793 required: true 777 required: true
794 type: integer 778 type: integer
779 - description: Discussion ID
780 in: path
781 name: discussionid
782 required: true
783 type: integer
795 - description: Body 784 - description: Body
796 in: body 785 in: body
797 name: request 786 name: request