{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hybriqx-com/json-schema/hybriqx-com-post-workout-input-schema.json",
  "title": "PostWorkoutInput",
  "description": "One workout posted straight to the chosen classes on one day: written, scheduled and visible in one step.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hybriqx-com-openapi.json#/components/schemas/PostWorkoutInput",
  "properties": {
    "title": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Title"
    },
    "date": {
      "type": "string",
      "maxLength": 10,
      "minLength": 10,
      "title": "Date"
    },
    "tracks": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 12,
      "minItems": 1,
      "title": "Tracks"
    },
    "blocks": {
      "items": {
        "$ref": "#/$defs/BlockInput"
      },
      "type": "array",
      "maxItems": 12,
      "minItems": 1,
      "title": "Blocks"
    },
    "coach_note": {
      "type": "string",
      "maxLength": 300,
      "title": "Coach Note",
      "default": ""
    },
    "scaling": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 6,
      "title": "Scaling"
    },
    "score_type": {
      "type": "string",
      "enum": [
        "auto",
        "time",
        "rounds_reps",
        "load",
        "reps"
      ],
      "title": "Score Type",
      "default": "auto"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "title",
    "date",
    "tracks",
    "blocks"
  ],
  "$defs": {
    "BlockInput": {
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 60,
          "minLength": 1,
          "title": "Name"
        },
        "format": {
          "type": "string",
          "enum": [
            "strength",
            "amrap",
            "rft",
            "emom",
            "tabata"
          ],
          "title": "Format",
          "default": "strength"
        },
        "minutes": {
          "type": "string",
          "maxLength": 10,
          "title": "Minutes",
          "default": ""
        },
        "rounds": {
          "type": "string",
          "maxLength": 10,
          "title": "Rounds",
          "default": ""
        },
        "time_cap": {
          "type": "string",
          "maxLength": 10,
          "title": "Time Cap",
          "default": ""
        },
        "interval": {
          "type": "string",
          "maxLength": 10,
          "title": "Interval",
          "default": ""
        },
        "work": {
          "type": "string",
          "maxLength": 10,
          "title": "Work",
          "default": ""
        },
        "rest_secs": {
          "type": "string",
          "maxLength": 10,
          "title": "Rest Secs",
          "default": ""
        },
        "exercises": {
          "items": {
            "$ref": "#/$defs/ExerciseInput"
          },
          "type": "array",
          "maxItems": 30,
          "title": "Exercises"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name"
      ],
      "title": "BlockInput"
    },
    "ExerciseInput": {
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 80,
          "minLength": 1,
          "title": "Name"
        },
        "sets": {
          "type": "string",
          "maxLength": 20,
          "title": "Sets",
          "default": ""
        },
        "reps": {
          "type": "string",
          "maxLength": 20,
          "title": "Reps",
          "default": ""
        },
        "load": {
          "type": "string",
          "maxLength": 40,
          "title": "Load",
          "default": ""
        },
        "rest": {
          "type": "string",
          "maxLength": 20,
          "title": "Rest",
          "default": ""
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name"
      ],
      "title": "ExerciseInput"
    }
  }
}