{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/semipro-coach/json-schema/semipro-coach-event-demand-request-schema.json",
  "title": "EventDemandRequest",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/semipro-coach-openapi.yaml#/components/schemas/EventDemandRequest",
  "type": "object",
  "properties": {
    "gpx_xml": {
      "type": "string",
      "description": "Complete GPX XML. Provide this or gpx_base64."
    },
    "gpx_base64": {
      "type": "string",
      "contentEncoding": "base64",
      "description": "Base64-encoded GPX. Maximum decoded size is 3 MB."
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 160
        },
        "type": {
          "type": "string",
          "enum": [
            "road_race",
            "criterium",
            "time_trial",
            "gran_fondo",
            "sportive",
            "gravel",
            "mtb",
            "mtb_xc",
            "ultra",
            "stage",
            "triathlon_bike_leg",
            "other"
          ]
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "start_time": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
        },
        "course_format": {
          "type": "string",
          "enum": [
            "point_to_point",
            "loop",
            "laps"
          ]
        },
        "course_laps": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      }
    }
  },
  "anyOf": [
    {
      "required": [
        "gpx_xml"
      ]
    },
    {
      "required": [
        "gpx_base64"
      ]
    }
  ],
  "additionalProperties": false
}