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:
@@ -1192,6 +1192,40 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/races/last": {
|
||||
"get": {
|
||||
"description": "Returns the details and podium/results of the most recently finished race.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"races"
|
||||
],
|
||||
"summary": "Get the results of the last finished race",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Last race results",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/transport.LobbyRace"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "No finished races found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/races/plans": {
|
||||
"get": {
|
||||
"description": "Returns race plans in ascending start_at order. Pass back the ` + "`" + `next_cursor` + "`" + ` to get the next page.",
|
||||
@@ -1534,6 +1568,56 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/races/{id}": {
|
||||
"get": {
|
||||
"description": "Returns details of a single race by its ID. Works for both live and finished races.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"races"
|
||||
],
|
||||
"summary": "Get results of a specific race by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Race ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Race details",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/transport.LobbyRace"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Missing race id",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Race not found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/tracks": {
|
||||
"get": {
|
||||
"description": "Returns all tracks visible to the caller. Optional query filters: ` + "`" + `scope=system|public|private` + "`" + `, ` + "`" + `tag=\u003cstring\u003e` + "`" + `.",
|
||||
|
||||
Reference in New Issue
Block a user