{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coachwatts-com/json-schema/coachwatts-com-workout-schema.json",
  "title": "Workout",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coachwatts-com-openapi.yml#/components/schemas/Workout",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "externalId": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "oauthApp": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceName": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "date": {
      "type": "string",
      "format": "date-time"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "type": {
      "type": [
        "string",
        "null"
      ]
    },
    "durationSec": {
      "type": "integer"
    },
    "distanceMeters": {
      "type": [
        "number",
        "null"
      ]
    },
    "elevationGain": {
      "type": [
        "integer",
        "null"
      ]
    },
    "averageWatts": {
      "type": [
        "integer",
        "null"
      ]
    },
    "maxWatts": {
      "type": [
        "integer",
        "null"
      ]
    },
    "normalizedPower": {
      "type": [
        "integer",
        "null"
      ]
    },
    "averageHr": {
      "type": [
        "integer",
        "null"
      ]
    },
    "maxHr": {
      "type": [
        "integer",
        "null"
      ]
    },
    "tss": {
      "type": [
        "number",
        "null"
      ]
    },
    "intensity": {
      "type": [
        "number",
        "null"
      ]
    },
    "kilojoules": {
      "type": [
        "integer",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}