Merge pull request #27 from nprasad2077/cleanup

Cleanup
This commit is contained in:
2025-07-01 18:24:42 -05:00
committed by GitHub
7 changed files with 52 additions and 8 deletions
@@ -95,6 +95,8 @@ func ScrapePlayerAdvancedStats(db *gorm.DB) fiber.Handler {
// @Summary Get player advanced stats
// @Description Returns filtered and paginated player advanced stats
// @Tags PlayerStats
// @x-order 2
// @Group Player Stats
// @Accept json
// @Produce json
// @Param season query int false "Season (e.g., 2025)"
@@ -72,6 +72,8 @@ func ScrapePlayerShotChart(db *gorm.DB) fiber.Handler {
// @Summary Get shot-chart data
// @Description Returns a paginated list of shot-chart points, optionally filtered by various parameters.
// @Tags PlayerShotChart
// @x-order 3
// @Group Player-Specific
// @Accept json
// @Produce json
// @Param page query int false "Page number for pagination (defaults to 1)"
+2
View File
@@ -96,6 +96,8 @@ func ScrapePlayerTotalStats(db *gorm.DB) fiber.Handler {
// @Summary Get player total stats
// @Description Filter and paginate player totals
// @Tags PlayerTotals
// @x-order 1
// @Group Player Stats
// @Accept json
// @Produce json
// @Param season query int false "Season (e.g. 2000)"
+18 -4
View File
@@ -98,7 +98,8 @@ const docTemplate = `{
}
}
}
}
},
"x-order": 2
}
},
"/api/playershotchart": {
@@ -183,7 +184,8 @@ const docTemplate = `{
}
}
}
}
},
"x-order": 3
}
},
"/api/playertotals": {
@@ -268,7 +270,8 @@ const docTemplate = `{
}
}
}
}
},
"x-order": 1
}
}
},
@@ -455,7 +458,18 @@ const docTemplate = `{
}
}
}
}
},
"tags": [
{
"name": "PlayerTotals"
},
{
"name": "PlayerStats"
},
{
"name": "PlayerShotChart"
}
]
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
+18 -4
View File
@@ -94,7 +94,8 @@
}
}
}
}
},
"x-order": 2
}
},
"/api/playershotchart": {
@@ -179,7 +180,8 @@
}
}
}
}
},
"x-order": 3
}
},
"/api/playertotals": {
@@ -264,7 +266,8 @@
}
}
}
}
},
"x-order": 1
}
}
},
@@ -451,5 +454,16 @@
}
}
}
}
},
"tags": [
{
"name": "PlayerTotals"
},
{
"name": "PlayerStats"
},
{
"name": "PlayerShotChart"
}
]
}
+7
View File
@@ -185,6 +185,7 @@ paths:
summary: Get player advanced stats
tags:
- PlayerStats
x-order: 2
/api/playershotchart:
get:
consumes:
@@ -242,6 +243,7 @@ paths:
summary: Get shot-chart data
tags:
- PlayerShotChart
x-order: 3
/api/playertotals:
get:
consumes:
@@ -299,6 +301,11 @@ paths:
summary: Get player total stats
tags:
- PlayerTotals
x-order: 1
schemes:
- https
swagger: "2.0"
tags:
- name: PlayerTotals
- name: PlayerStats
- name: PlayerShotChart
+3
View File
@@ -4,6 +4,9 @@
// @schemes https
// @BasePath /
//
// @tag.name PlayerTotals
// @tag.name PlayerStats
// @tag.name PlayerShotChart
// To re-enable security docs:
// 1. Uncomment the securityDefinitions block below.
// 2. Uncomment the @Security annotation in each controller.