Add races results GET endpoints (by ID and last finished) and regenerate swagger specs

This commit is contained in:
2026-07-17 22:41:55 +04:00
parent c8ff4c04ad
commit 9c9632343d
10 changed files with 812 additions and 318 deletions
+59
View File
@@ -1660,6 +1660,65 @@ paths:
summary: List races (keyset paginated)
tags:
- races
/api/races/{id}:
get:
description: Returns details of a single race by its ID. Works for both live
and finished races.
parameters:
- description: Race ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Race details
schema:
$ref: '#/definitions/transport.LobbyRace'
"400":
description: Missing race id
schema:
additionalProperties: true
type: object
"404":
description: Race not found
schema:
additionalProperties: true
type: object
"500":
description: Internal server error
schema:
additionalProperties: true
type: object
summary: Get results of a specific race by ID
tags:
- races
/api/races/last:
get:
description: Returns the details and podium/results of the most recently finished
race.
produces:
- application/json
responses:
"200":
description: Last race results
schema:
$ref: '#/definitions/transport.LobbyRace'
"404":
description: No finished races found
schema:
additionalProperties: true
type: object
"500":
description: Internal server error
schema:
additionalProperties: true
type: object
summary: Get the results of the last finished race
tags:
- races
/api/races/plans:
get:
description: Returns race plans in ascending start_at order. Pass back the `next_cursor`