swagger order

This commit is contained in:
Ravi Prasad
2025-07-01 18:24:12 -05:00
parent 637d3e4aba
commit 3d93e26a71
7 changed files with 49 additions and 8 deletions
@@ -95,6 +95,7 @@ func ScrapePlayerAdvancedStats(db *gorm.DB) fiber.Handler {
// @Summary Get player advanced stats // @Summary Get player advanced stats
// @Description Returns filtered and paginated player advanced stats // @Description Returns filtered and paginated player advanced stats
// @Tags PlayerStats // @Tags PlayerStats
// @x-order 2
// @Group Player Stats // @Group Player Stats
// @Accept json // @Accept json
// @Produce json // @Produce json
@@ -72,6 +72,7 @@ func ScrapePlayerShotChart(db *gorm.DB) fiber.Handler {
// @Summary Get shot-chart data // @Summary Get shot-chart data
// @Description Returns a paginated list of shot-chart points, optionally filtered by various parameters. // @Description Returns a paginated list of shot-chart points, optionally filtered by various parameters.
// @Tags PlayerShotChart // @Tags PlayerShotChart
// @x-order 3
// @Group Player-Specific // @Group Player-Specific
// @Accept json // @Accept json
// @Produce json // @Produce json
+1
View File
@@ -96,6 +96,7 @@ func ScrapePlayerTotalStats(db *gorm.DB) fiber.Handler {
// @Summary Get player total stats // @Summary Get player total stats
// @Description Filter and paginate player totals // @Description Filter and paginate player totals
// @Tags PlayerTotals // @Tags PlayerTotals
// @x-order 1
// @Group Player Stats // @Group Player Stats
// @Accept json // @Accept json
// @Produce json // @Produce json
+17 -3
View File
@@ -98,7 +98,8 @@ const docTemplate = `{
} }
} }
} }
} },
"x-order": 2
} }
}, },
"/api/playershotchart": { "/api/playershotchart": {
@@ -183,7 +184,8 @@ const docTemplate = `{
} }
} }
} }
} },
"x-order": 3
} }
}, },
"/api/playertotals": { "/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 // SwaggerInfo holds exported Swagger Info so clients can modify it
+17 -3
View File
@@ -94,7 +94,8 @@
} }
} }
} }
} },
"x-order": 2
} }
}, },
"/api/playershotchart": { "/api/playershotchart": {
@@ -179,7 +180,8 @@
} }
} }
} }
} },
"x-order": 3
} }
}, },
"/api/playertotals": { "/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 summary: Get player advanced stats
tags: tags:
- PlayerStats - PlayerStats
x-order: 2
/api/playershotchart: /api/playershotchart:
get: get:
consumes: consumes:
@@ -242,6 +243,7 @@ paths:
summary: Get shot-chart data summary: Get shot-chart data
tags: tags:
- PlayerShotChart - PlayerShotChart
x-order: 3
/api/playertotals: /api/playertotals:
get: get:
consumes: consumes:
@@ -299,6 +301,11 @@ paths:
summary: Get player total stats summary: Get player total stats
tags: tags:
- PlayerTotals - PlayerTotals
x-order: 1
schemes: schemes:
- https - https
swagger: "2.0" swagger: "2.0"
tags:
- name: PlayerTotals
- name: PlayerStats
- name: PlayerShotChart
+3
View File
@@ -4,6 +4,9 @@
// @schemes https // @schemes https
// @BasePath / // @BasePath /
// //
// @tag.name PlayerTotals
// @tag.name PlayerStats
// @tag.name PlayerShotChart
// To re-enable security docs: // To re-enable security docs:
// 1. Uncomment the securityDefinitions block below. // 1. Uncomment the securityDefinitions block below.
// 2. Uncomment the @Security annotation in each controller. // 2. Uncomment the @Security annotation in each controller.