Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio1988 committed Jan 30, 2024
1 parent 7b28b1d commit 2534d06
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 54 deletions.
51 changes: 25 additions & 26 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/main.GolbatFence"
"$ref": "#/definitions/geojson.Feature"
}
}
],
Expand Down Expand Up @@ -106,7 +106,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/main.GolbatFence"
"$ref": "#/definitions/geojson.Feature"
}
}
],
Expand Down Expand Up @@ -375,6 +375,29 @@ const docTemplate = `{
}
}
},
"geojson.Feature": {
"type": "object",
"properties": {
"bbox": {
"type": "array",
"items": {
"type": "number"
}
},
"geometry": {},
"id": {},
"properties": {
"$ref": "#/definitions/geojson.Properties"
},
"type": {
"type": "string"
}
}
},
"geojson.Properties": {
"type": "object",
"additionalProperties": true
},
"gohbem.PokemonEntry": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -410,30 +433,6 @@ const docTemplate = `{
}
}
},
"main.ApiLocation": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"example": 40.73061
},
"lon": {
"type": "number",
"example": -73.935242
}
}
},
"main.GolbatFence": {
"type": "object",
"properties": {
"fence": {
"type": "array",
"items": {
"$ref": "#/definitions/main.ApiLocation"
}
}
}
},
"main.Response": {
"type": "object",
"properties": {
Expand Down
51 changes: 25 additions & 26 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/main.GolbatFence"
"$ref": "#/definitions/geojson.Feature"
}
}
],
Expand Down Expand Up @@ -95,7 +95,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/main.GolbatFence"
"$ref": "#/definitions/geojson.Feature"
}
}
],
Expand Down Expand Up @@ -364,6 +364,29 @@
}
}
},
"geojson.Feature": {
"type": "object",
"properties": {
"bbox": {
"type": "array",
"items": {
"type": "number"
}
},
"geometry": {},
"id": {},
"properties": {
"$ref": "#/definitions/geojson.Properties"
},
"type": {
"type": "string"
}
}
},
"geojson.Properties": {
"type": "object",
"additionalProperties": true
},
"gohbem.PokemonEntry": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -399,30 +422,6 @@
}
}
},
"main.ApiLocation": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"example": 40.73061
},
"lon": {
"type": "number",
"example": -73.935242
}
}
},
"main.GolbatFence": {
"type": "object",
"properties": {
"fence": {
"type": "array",
"items": {
"$ref": "#/definitions/main.ApiLocation"
}
}
}
},
"main.Response": {
"type": "object",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func AuthRequired() gin.HandlerFunc {
// @Tags quest
// @Accept json
// @Produce json
// @Param fence body GolbatFence true "Fence"
// @Param fence body geojson.Feature true "Fence"
// @Success 200 {object} Response "Success"
// @Router /api/clear-quests [post]
func ClearQuests(c *gin.Context) {
Expand Down Expand Up @@ -455,7 +455,7 @@ func PokemonSearch(c *gin.Context) {
// @Tags quest
// @Accept json
// @Produce json
// @Param fence body GolbatFence true "Fence"
// @Param fence body geojson.Feature true "Fence"
// @Success 200 {array} db.QuestStatus "ok"
// @Router /api/quest-status [post]
func GetQuestStatus(c *gin.Context) {
Expand Down

0 comments on commit 2534d06

Please sign in to comment.