mirror of
https://github.com/IS1DI/x0gp.git
synced 2026-07-19 05:47:02 +00:00
Add races results GET endpoints (by ID and last finished) and regenerate swagger specs
This commit is contained in:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user