swagger update

This commit is contained in:
Ravi Prasad
2025-06-18 22:32:08 -05:00
parent 0aac099136
commit 9475e1a245
8 changed files with 18 additions and 67 deletions
+1 -23
View File
@@ -17,11 +17,6 @@ const docTemplate = `{
"paths": {
"/api/playeradvancedstats": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns filtered and paginated player advanced stats",
"consumes": [
"application/json"
@@ -160,11 +155,6 @@ const docTemplate = `{
},
"/api/playershotchart": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns shot-chart points, optionally filtered by playerId and/or season",
"consumes": [
"application/json"
@@ -281,11 +271,6 @@ const docTemplate = `{
},
"/api/playertotals": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Filter and paginate player totals",
"consumes": [
"application/json"
@@ -605,13 +590,6 @@ const docTemplate = `{
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "X-API-Key",
"in": "header"
}
}
}`
@@ -622,7 +600,7 @@ var SwaggerInfo = &swag.Spec{
BasePath: "/",
Schemes: []string{"http", "https"},
Title: "NBA_Go API",
Description: "Stats service with API-key auth",
Description: "Stats service, now with public access!",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
+1 -23
View File
@@ -5,7 +5,7 @@
],
"swagger": "2.0",
"info": {
"description": "Stats service with API-key auth",
"description": "Stats service, now with public access!",
"title": "NBA_Go API",
"contact": {},
"version": "1.0"
@@ -14,11 +14,6 @@
"paths": {
"/api/playeradvancedstats": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns filtered and paginated player advanced stats",
"consumes": [
"application/json"
@@ -157,11 +152,6 @@
},
"/api/playershotchart": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns shot-chart points, optionally filtered by playerId and/or season",
"consumes": [
"application/json"
@@ -278,11 +268,6 @@
},
"/api/playertotals": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Filter and paginate player totals",
"consumes": [
"application/json"
@@ -602,12 +587,5 @@
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "X-API-Key",
"in": "header"
}
}
}
+1 -12
View File
@@ -123,7 +123,7 @@ definitions:
type: object
info:
contact: {}
description: Stats service with API-key auth
description: Stats service, now with public access!
title: NBA_Go API
version: "1.0"
paths:
@@ -182,8 +182,6 @@ paths:
additionalProperties:
type: string
type: object
security:
- ApiKeyAuth: []
summary: Get player advanced stats
tags:
- PlayerStats
@@ -251,8 +249,6 @@ paths:
additionalProperties:
type: string
type: object
security:
- ApiKeyAuth: []
summary: Get shot-chart data
tags:
- PlayerShotChart
@@ -355,8 +351,6 @@ paths:
additionalProperties:
type: string
type: object
security:
- ApiKeyAuth: []
summary: Get player total stats
tags:
- PlayerTotals
@@ -397,9 +391,4 @@ paths:
schemes:
- http
- https
securityDefinitions:
ApiKeyAuth:
in: header
name: X-API-Key
type: apiKey
swagger: "2.0"