{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compteam-io/json-schema/compteam-io-goal-plan-save-schema.json",
  "title": "GoalPlanSave",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compteam-io-athlete-goal-agent-api-openapi.yml#/components/schemas/GoalPlanSave",
  "properties": {
    "goal_summary": {
      "type": "string",
      "maxLength": 1000,
      "minLength": 1,
      "title": "Goal Summary"
    },
    "nutrition_notes": {
      "type": "string",
      "maxLength": 12000,
      "title": "Nutrition Notes",
      "default": ""
    },
    "items": {
      "items": {
        "$ref": "#/$defs/GoalPlanItem"
      },
      "type": "array",
      "maxItems": 28,
      "minItems": 1,
      "title": "Items"
    }
  },
  "type": "object",
  "required": [
    "goal_summary",
    "items"
  ],
  "$defs": {
    "GoalPlanItem": {
      "properties": {
        "activity_title": {
          "type": "string",
          "maxLength": 120,
          "minLength": 1,
          "title": "Activity Title"
        },
        "activity_type": {
          "type": "string",
          "maxLength": 60,
          "minLength": 1,
          "title": "Activity Type"
        },
        "day_of_week": {
          "type": "integer",
          "maximum": 6.0,
          "minimum": 0.0,
          "title": "Day Of Week"
        },
        "start_time": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start Time"
        },
        "time_block": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "morning",
                "lunch",
                "afternoon",
                "evening",
                "weekend"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Time Block"
        },
        "duration_min": {
          "type": "integer",
          "maximum": 480.0,
          "minimum": 5.0,
          "title": "Duration Min"
        },
        "intensity": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "light",
                "moderate",
                "hard"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Intensity"
        },
        "notes": {
          "type": "string",
          "maxLength": 4000,
          "title": "Notes",
          "default": ""
        }
      },
      "type": "object",
      "required": [
        "activity_title",
        "activity_type",
        "day_of_week",
        "duration_min"
      ],
      "title": "GoalPlanItem"
    }
  }
}