feat: implement battle replay controller, service, and routes with Swagger documentation
Build and Release / release (push) Successful in 3m2s

This commit is contained in:
2026-05-28 02:46:48 +07:00
parent 1d0733819d
commit 54b1522db5
7 changed files with 198 additions and 0 deletions
+48
View File
@@ -450,6 +450,54 @@ const docTemplate = `{
}
}
},
"/battle-replays/geometries": {
"get": {
"description": "Get battle replays grouped by geometry IDs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BattleReplays"
],
"summary": "Get battle replays by geometry IDs",
"parameters": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "geometry_ids",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/battle-replays/geometry/{geometryId}": {
"get": {
"description": "Get all battle replays associated with a specific geometry",
+48
View File
@@ -443,6 +443,54 @@
}
}
},
"/battle-replays/geometries": {
"get": {
"description": "Get battle replays grouped by geometry IDs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BattleReplays"
],
"summary": "Get battle replays by geometry IDs",
"parameters": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "geometry_ids",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/battle-replays/geometry/{geometryId}": {
"get": {
"description": "Get all battle replays associated with a specific geometry",
+32
View File
@@ -1070,6 +1070,38 @@ paths:
summary: Get battle replay by ID
tags:
- BattleReplays
/battle-replays/geometries:
get:
consumes:
- application/json
description: Get battle replays grouped by geometry IDs
parameters:
- collectionFormat: csv
in: query
items:
type: string
minItems: 1
name: geometry_ids
required: true
type: array
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
summary: Get battle replays by geometry IDs
tags:
- BattleReplays
/battle-replays/geometry/{geometryId}:
get:
consumes: