{
  "openapi": "3.1.0",
  "info": {
    "title": "SimRacingBelgium ACEVO Statistics",
    "version": "1.0.0-rc1",
    "description": "Read-only API. Timing is integer milliseconds. SteamID, raw JSON and private provenance are never exposed. Flags policy is inferred, not official Kunos documentation."
  },
  "paths": {
    "/api/v1/summary": {
      "get": {
        "summary": "Global counts, recent sessions and current records",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counts": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer",
                        "format": "int64"
                      }
                    },
                    "recent": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Session"
                      }
                    },
                    "records": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Lap"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/racers": {
      "get": {
        "summary": "Search current and historical names",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RacerPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/racers/{id}": {
      "get": {
        "summary": "Racer statistics, record previews and recent results",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "racer": {
                      "$ref": "#/components/schemas/Racer"
                    },
                    "stats": {
                      "type": "object"
                    },
                    "records": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Lap"
                      }
                    },
                    "recent": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Session"
                      }
                    },
                    "cars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Car"
                      }
                    },
                    "tracks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Layout"
                      }
                    },
                    "names": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/tracks": {
      "get": {
        "summary": "Track catalog",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64"
                      },
                      "name": {
                        "type": "string"
                      },
                      "layouts": {
                        "type": "integer",
                        "format": "int64"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/layouts": {
      "get": {
        "summary": "Track layouts",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Layout"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/cars": {
      "get": {
        "summary": "Car models and presets",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Car"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/servers": {
      "get": {
        "summary": "Server instances",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/sessions": {
      "get": {
        "summary": "Session history",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "racer",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/sessions/{id}": {
      "get": {
        "summary": "Official standings, participant/car links and incident counts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "$ref": "#/components/schemas/Session"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Result"
                      }
                    },
                    "cars": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "incident_note": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/sessions/{id}/laps": {
      "get": {
        "summary": "Session lap history",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          },
          {
            "name": "racer",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "car",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LapPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/laps": {
      "get": {
        "summary": "Lap history; at least racer, layout or car required",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          },
          {
            "name": "racer",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "car",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LapPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/leaderboards": {
      "get": {
        "summary": "Best valid lap per racer; required layout",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "car",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "racer",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "enum": [
                "time",
                "name"
              ],
              "default": "time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/records": {
      "get": {
        "summary": "Records per layout/car, or overall per layout",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "car",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "racer",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "enum": [
                "layout",
                "layout_car"
              ],
              "default": "layout_car"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LapPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/sectors": {
      "get": {
        "summary": "Comparable sector minimums; layout and car required",
        "parameters": [
          {
            "name": "layout",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "car",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "racer",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sectors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "sector_count": {
                            "type": "integer",
                            "format": "int64"
                          },
                          "sector_number": {
                            "type": "integer",
                            "format": "int64"
                          },
                          "time_ms": {
                            "type": "integer",
                            "format": "int64"
                          }
                        }
                      }
                    },
                    "note": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/api/v1/events": {
      "get": {
        "summary": "Provisional event groups",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "limit": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "offset": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/health/live": {
      "get": {
        "summary": "Process liveness",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "summary": "Database view readiness",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limit"
          },
          "500": {
            "description": "Generic error; no private details"
          },
          "503": {
            "description": "Database unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Racer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "nation": {
            "type": "string"
          }
        }
      },
      "Layout": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "track_id": {
            "type": "integer",
            "format": "int64"
          },
          "track": {
            "type": "string"
          },
          "layout": {
            "type": "string"
          }
        }
      },
      "Car": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "preset": {
            "type": "string"
          }
        }
      },
      "Session": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "server_instance_id": {
            "type": "integer",
            "format": "int64"
          },
          "server_name": {
            "type": "string"
          },
          "layout_id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "session_type": {
            "type": "string"
          },
          "occurred_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "track": {
            "type": "string"
          },
          "layout": {
            "type": "string"
          },
          "participants": {
            "type": "integer",
            "format": "int64"
          },
          "laps": {
            "type": "integer",
            "format": "int64"
          },
          "penalties": {
            "type": "integer",
            "format": "int64"
          },
          "collisions": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Result": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "racer_id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "nation": {
            "type": "string"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ]
          },
          "standing_time_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Milliseconds; null means no official time"
          },
          "finish_status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Lap": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_index": {
            "type": "integer",
            "format": "int64"
          },
          "racer_id": {
            "type": "integer",
            "format": "int64"
          },
          "layout_id": {
            "type": "integer",
            "format": "int64"
          },
          "car_id": {
            "type": "integer",
            "format": "int64"
          },
          "server_instance_id": {
            "type": "integer",
            "format": "int64"
          },
          "session_type": {
            "type": "string"
          },
          "time_ms": {
            "type": "integer",
            "format": "int64"
          },
          "flags": {
            "type": "integer",
            "format": "int64"
          },
          "is_valid": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_final": {
            "type": "boolean"
          },
          "sectors_comparable": {
            "type": "boolean"
          },
          "sector_count": {
            "type": "integer",
            "format": "int64"
          },
          "occurred_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "racer": {
            "type": "string"
          },
          "car": {
            "type": "string"
          },
          "track": {
            "type": "string"
          },
          "layout": {
            "type": "string"
          },
          "sectors": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSON-encoded array of integer sector durations"
          }
        }
      },
      "Leaderboard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Lap"
          },
          {
            "type": "object",
            "properties": {
              "rank": {
                "type": "integer",
                "format": "int64"
              },
              "gap_ms": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "Error": {
        "type": "object",
        "additionalProperties": true
      },
      "RacerPage": {
        "type": "object",
        "required": [
          "items",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Racer"
            }
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "SessionPage": {
        "type": "object",
        "required": [
          "items",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            }
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "LapPage": {
        "type": "object",
        "required": [
          "items",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Lap"
            }
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "LeaderboardPage": {
        "type": "object",
        "required": [
          "items",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Leaderboard"
            }
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
