{ "$defs": { "EarlyLateShiftMetric": { "additionalProperties": false, "allOf": [ { "else": { "properties": { "value": { "type": "null" } } }, "if": { "properties": { "status": { "const": "estimated" } } }, "then": { "properties": { "value": { "type": "number" } } } } ], "properties": { "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Value" }, "unit": { "const": "ms", "title": "Unit", "type": "string" }, "status": { "enum": [ "estimated", "unclear", "not_applicable" ], "title": "Status", "type": "string" }, "confidence": { "const": "est", "title": "Confidence", "type": "string" }, "note": { "minLength": 1, "title": "Note", "type": "string" }, "key": { "const": "early_late_shift_ms", "title": "Key", "type": "string" } }, "required": [ "value", "unit", "status", "confidence", "note", "key" ], "title": "EarlyLateShiftMetric", "type": "object" }, "FootDownToSwingMetric": { "additionalProperties": false, "allOf": [ { "else": { "properties": { "value": { "type": "null" } } }, "if": { "properties": { "status": { "const": "estimated" } } }, "then": { "properties": { "value": { "type": "number" } } } } ], "properties": { "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Value" }, "unit": { "const": "ms", "title": "Unit", "type": "string" }, "status": { "enum": [ "estimated", "unclear", "not_applicable" ], "title": "Status", "type": "string" }, "confidence": { "const": "est", "title": "Confidence", "type": "string" }, "note": { "minLength": 1, "title": "Note", "type": "string" }, "key": { "const": "foot_down_to_swing_ms", "title": "Key", "type": "string" } }, "required": [ "value", "unit", "status", "confidence", "note", "key" ], "title": "FootDownToSwingMetric", "type": "object" }, "LoadTimingRep": { "additionalProperties": false, "properties": { "rep": { "minimum": 1, "title": "Rep", "type": "integer" }, "outcome": { "enum": [ "hit", "miss", "unknown" ], "title": "Outcome", "type": "string" }, "stepped": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Stepped" }, "metrics": { "items": false, "maxItems": 4, "minItems": 4, "prefixItems": [ { "$ref": "#/$defs/LoadToSwingMetric" }, { "$ref": "#/$defs/FootDownToSwingMetric" }, { "$ref": "#/$defs/SwingDurationMetric" }, { "$ref": "#/$defs/EarlyLateShiftMetric" } ], "title": "Metrics", "type": "array" } }, "required": [ "rep", "outcome", "stepped", "metrics" ], "title": "LoadTimingRep", "type": "object" }, "LoadToSwingMetric": { "additionalProperties": false, "allOf": [ { "else": { "properties": { "value": { "type": "null" } } }, "if": { "properties": { "status": { "const": "estimated" } } }, "then": { "properties": { "value": { "type": "number" } } } } ], "properties": { "value": { "anyOf": [ { "exclusiveMinimum": 0, "type": "number" }, { "type": "null" } ], "title": "Value" }, "unit": { "const": "ms", "title": "Unit", "type": "string" }, "status": { "enum": [ "estimated", "unclear" ], "title": "Status", "type": "string" }, "confidence": { "const": "est", "title": "Confidence", "type": "string" }, "note": { "minLength": 1, "title": "Note", "type": "string" }, "key": { "const": "load_to_swing_ms", "title": "Key", "type": "string" } }, "required": [ "value", "unit", "status", "confidence", "note", "key" ], "title": "LoadToSwingMetric", "type": "object" }, "SwingDurationMetric": { "additionalProperties": false, "allOf": [ { "else": { "properties": { "value": { "type": "null" } } }, "if": { "properties": { "status": { "const": "estimated" } } }, "then": { "properties": { "value": { "type": "number" } } } } ], "properties": { "value": { "anyOf": [ { "exclusiveMinimum": 0, "type": "number" }, { "type": "null" } ], "title": "Value" }, "unit": { "const": "ms", "title": "Unit", "type": "string" }, "status": { "enum": [ "estimated", "unclear" ], "title": "Status", "type": "string" }, "confidence": { "const": "est", "title": "Confidence", "type": "string" }, "note": { "minLength": 1, "title": "Note", "type": "string" }, "key": { "const": "swing_duration_ms", "title": "Key", "type": "string" }, "end_event": { "anyOf": [ { "enum": [ "contact", "closest_approach" ], "type": "string" }, { "type": "null" } ], "title": "End Event" } }, "required": [ "value", "unit", "status", "confidence", "note", "key", "end_event" ], "title": "SwingDurationMetric", "type": "object" }, "TimingCapture": { "additionalProperties": false, "properties": { "ok": { "title": "Ok", "type": "boolean" }, "reasons": { "items": { "enum": [ "a_bit_blurry", "a_bit_dark", "low_fps", "low_pose_confidence", "multiple_people", "no_person", "partly_out_of_frame", "person_too_small", "player_switched", "pose_confidence_fair", "too_blurry", "too_dark", "very_low_fps", "view_uncertain", "wrong_view" ], "type": "string" }, "title": "Reasons", "type": "array" } }, "required": [ "ok", "reasons" ], "title": "TimingCapture", "type": "object" } }, "additionalProperties": false, "properties": { "schema_version": { "const": "3.0", "title": "Schema Version", "type": "string" }, "discipline": { "const": "hitting", "title": "Discipline", "type": "string" }, "time_basis": { "const": "capture", "title": "Time Basis", "type": "string" }, "capture": { "$ref": "#/$defs/TimingCapture" }, "reps": { "items": { "$ref": "#/$defs/LoadTimingRep" }, "maxItems": 100, "title": "Reps", "type": "array" } }, "required": [ "schema_version", "discipline", "time_basis", "capture", "reps" ], "title": "Load and timing payload", "type": "object", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "GET /v1/analyses/{job_id}/load-timing. Capture milliseconds; four estimated or null timing values per swing. Body extension is not ball contact. Negative foot timing means swing before landing; a negative early/late shift asks for an earlier swing." }