{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sportstatsapi/json-schema/sportstatsapi-dto-ski-athlete-response-schema.json",
  "title": "dto.SkiAthleteResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sportstatsapi-alpine-skiing-api-openapi.yml#/components/schemas/dto.SkiAthleteResponse",
  "properties": {
    "birth_date": {
      "type": "string"
    },
    "gender": {
      "enum": [
        "male",
        "female"
      ],
      "type": "string"
    },
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "nation": {
      "type": "string"
    },
    "photo": {
      "$ref": "#/$defs/dto.SkiPhotoResponse"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/dto.SkiAthleteResultResponse"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "dto.SkiAthleteResultResponse": {
      "properties": {
        "athlete_id": {
          "type": "integer"
        },
        "behind": {
          "type": "string"
        },
        "bib": {
          "type": "string"
        },
        "event": {
          "$ref": "#/$defs/dto.SkiEventResponse"
        },
        "is_team": {
          "type": "boolean"
        },
        "members": {
          "items": {
            "$ref": "#/$defs/dto.SkiResultResponse"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        },
        "nation": {
          "type": "string"
        },
        "race": {
          "$ref": "#/$defs/dto.SkiRaceResponse"
        },
        "rank": {
          "type": "integer"
        },
        "result": {
          "description": "time, points or score; DNF, DNS, DSQ",
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.SkiEventResponse": {
      "properties": {
        "country": {
          "description": "IOC code",
          "type": "string"
        },
        "end_date": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "kind": {
          "enum": [
            "world-cup",
            "olympics"
          ],
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "race_count": {
          "type": "integer"
        },
        "races": {
          "items": {
            "$ref": "#/$defs/dto.SkiRaceResponse"
          },
          "type": "array"
        },
        "season": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "status_code": {
          "enum": [
            "scheduled",
            "live",
            "final"
          ],
          "type": "string"
        },
        "venue": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.SkiPhotoResponse": {
      "properties": {
        "author": {
          "type": "string"
        },
        "credit": {
          "type": "string"
        },
        "licence": {
          "type": "string"
        },
        "licence_url": {
          "type": "string"
        },
        "source_url": {
          "description": "the Commons file page",
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.SkiRaceResponse": {
      "properties": {
        "date": {
          "type": "string"
        },
        "discipline": {
          "type": "string"
        },
        "event_id": {
          "type": "integer"
        },
        "full_results": {
          "type": "boolean"
        },
        "gender": {
          "enum": [
            "men",
            "women",
            "mixed"
          ],
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "results": {
          "items": {
            "$ref": "#/$defs/dto.SkiResultResponse"
          },
          "type": "array"
        },
        "status_code": {
          "enum": [
            "scheduled",
            "final",
            "cancelled",
            "awaiting-results"
          ],
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "winner": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.SkiResultResponse": {
      "properties": {
        "athlete_id": {
          "type": "integer"
        },
        "behind": {
          "type": "string"
        },
        "bib": {
          "type": "string"
        },
        "is_team": {
          "type": "boolean"
        },
        "members": {
          "items": {
            "$ref": "#/$defs/dto.SkiResultResponse"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        },
        "nation": {
          "type": "string"
        },
        "rank": {
          "type": "integer"
        },
        "result": {
          "description": "time, points or score; DNF, DNS, DSQ",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}