Skip to content

Commit

Permalink
Fix Swagger get paste parameter type
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasha Radchenko committed Aug 24, 2021
1 parent c3ce587 commit 31439d3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/hzpaste-api/internal/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ var doc = `{
"operationId": "get-string-by-int",
"parameters": [
{
"type": "integer",
"type": "string",
"description": "Paste ID",
"name": "id",
"in": "path",
Expand Down
2 changes: 1 addition & 1 deletion cmd/hzpaste-api/internal/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"operationId": "get-string-by-int",
"parameters": [
{
"type": "integer",
"type": "string",
"description": "Paste ID",
"name": "id",
"in": "path",
Expand Down
2 changes: 1 addition & 1 deletion cmd/hzpaste-api/internal/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ paths:
in: path
name: id
required: true
type: integer
type: string
produces:
- application/json
responses:
Expand Down
2 changes: 1 addition & 1 deletion cmd/hzpaste-api/internal/handlers/pastes.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func ListPastesH(p *paste.Storage) gin.HandlerFunc {
// @ID get-string-by-int
// @Accept json
// @Produce json
// @Param id path int true "Paste ID"
// @Param id path string true "Paste ID"
// @Success 200 {object} paste.Paste "paste"
// @Router /pastes/{id} [get]
// GetPasteH returns a handler that finds a single paste identified by an
Expand Down

0 comments on commit 31439d3

Please sign in to comment.