JSON Schema
- Viewer
- Schema
Loading ....
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sports-data-platform.com/schemas/tennis-events-v1.json",
"title": "Tennis Ingestion Event Schema",
"description": "This document describes the data contracts of the tennis play-by-play feed. Live data is available via Pulsar topic persistent://sports-data-platform/domain-playbyplay/tennis-events-v1\n",
"version": "v1",
"type": "object",
"definitions": {
"Message": {
"type": "object",
"title": "Base message",
"required": [
"type",
"Id",
"Sequence",
"UtcTimestamp"
],
"properties": {
"type": {
"type": "string",
"description": "Discriminator set by each concrete message (const)"
},
"Id": {
"type": "string"
},
"CorrelationId": {
"type": "string",
"nullable": true
},
"Sequence": {
"type": "integer",
"minimum": 1
},
"UtcTimestamp": {
"type": "string",
"format": "date-time",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.?\\d{0,6}Z?$"
}
},
"example": {
"CorrelationId": "61eb3ceb-997c-499b-974a-10b790739445",
"Sequence": 359,
"UtcTimestamp": "2025-08-20T15:05:34.9370000Z"
}
},
"ConfirmMessage": {
"allOf": [
{
"$ref": "#/definitions/Message"
},
{
"$ref": "#/definitions/ConfirmMessageBody"
}
]
},
"ConfirmMessageBody": {
"type": "object",
"properties": {
"IsConfirmed": {
"type": "boolean"
}
}
},
"CancelMessage": {
"allOf": [
{
"$ref": "#/definitions/Message"
}
]
},
"TennisMessage": {
"allOf": [
{
"$ref": "#/definitions/Message"
},
{
"$ref": "#/definitions/TennisMessageBody"
}
]
},
"TennisMessageBody": {
"type": "object",
"properties": {
"IsDelayed": {
"type": "boolean",
"nullable": true
}
}
},
"PointMessage": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/PointMessageBody"
}
]
},
"PointMessageBody": {
"type": "object",
"required": [
"Point"
],
"properties": {
"Point": {
"$ref": "#/definitions/Point"
},
"GameType": {
"$ref": "#/definitions/GameType",
"nullable": true
}
}
},
"AlarmBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "Alarm"
},
"Reason": {
"type": "string",
"nullable": true
}
},
"example": {
"Reason": "Alarm Reason"
}
},
"Alarm": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/AlarmBody"
}
]
},
"BallMarkInspectionBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "BallMarkInspection"
}
}
},
"BallMarkInspection": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/BallMarkInspectionBody"
}
]
},
"CancelPointBody": {
"type": "object",
"required": [
"type",
"Point",
"Score"
],
"properties": {
"type": {
"const": "CancelPoint"
},
"Point": {
"$ref": "#/definitions/Point"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"minItems": 1
}
}
},
"CancelPoint": {
"allOf": [
{
"$ref": "#/definitions/CancelMessage"
},
{
"$ref": "#/definitions/CancelPointBody"
}
]
},
"CancelPointFaultBody": {
"type": "object",
"required": [
"type",
"Point",
"Score"
],
"properties": {
"type": {
"const": "CancelPointFault"
},
"Point": {
"$ref": "#/definitions/Point"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"minItems": 1
}
}
},
"CancelPointFault": {
"allOf": [
{
"$ref": "#/definitions/CancelMessage"
},
{
"$ref": "#/definitions/CancelPointFaultBody"
}
]
},
"ChallengeCompletedBody": {
"type": "object",
"required": [
"type",
"Won"
],
"properties": {
"type": {
"const": "ChallengeCompleted"
},
"Won": {
"type": "boolean"
},
"Remaining": {
"type": "integer",
"nullable": true
}
}
},
"ChallengeCompleted": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/ChallengeCompletedBody"
}
]
},
"ChallengeInProgressBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "ChallengeInProgress"
},
"Competitor": {
"$ref": "#/definitions/Competitor",
"nullable": true
},
"Remaining": {
"type": "integer",
"nullable": true
}
}
},
"ChallengeInProgress": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/ChallengeInProgressBody"
}
]
},
"CodePenaltyBody": {
"type": "object",
"required": [
"type",
"Competitor"
],
"properties": {
"type": {
"const": "CodePenalty"
},
"Competitor": {
"$ref": "#/definitions/Competitor"
}
}
},
"CodePenalty": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/CodePenaltyBody"
}
]
},
"CodeViolationBody": {
"type": "object",
"required": [
"type",
"Reason",
"Competitor"
],
"properties": {
"type": {
"const": "CodeViolation"
},
"Reason": {
"type": "string"
},
"Competitor": {
"$ref": "#/definitions/Competitor"
},
"Player": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
}
},
"CodeViolation": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/CodeViolationBody"
}
]
},
"CoinTossBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "CoinToss"
},
"FirstServer": {
"$ref": "#/definitions/Server",
"nullable": true
}
}
},
"CoinToss": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/CoinTossBody"
}
]
},
"GamePenaltyBody": {
"type": "object",
"required": [
"type",
"Competitor",
"Score"
],
"properties": {
"type": {
"const": "GamePenalty"
},
"Competitor": {
"$ref": "#/definitions/Competitor"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"minItems": 1
}
}
},
"GamePenalty": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/GamePenaltyBody"
}
]
},
"MatchFinishedBody": {
"type": "object",
"required": [
"type",
"Score"
],
"properties": {
"type": {
"const": "MatchFinished"
},
"Outcome": {
"$ref": "#/definitions/MatchOutcome",
"nullable": true
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"minItems": 1
}
}
},
"MatchFinished": {
"allOf": [
{
"$ref": "#/definitions/ConfirmMessage"
},
{
"$ref": "#/definitions/MatchFinishedBody"
}
]
},
"MatchInProgressBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "MatchInProgress"
},
"Reason": {
"type": "string",
"nullable": true
}
}
},
"MatchInProgress": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/MatchInProgressBody"
}
]
},
"MatchNotStartedBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "MatchNotStarted"
}
}
},
"MatchNotStarted": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/MatchNotStartedBody"
}
]
},
"MatchRulesBody": {
"type": "object",
"required": [
"type",
"GameScoringType",
"SetScoringType",
"FinalSetScoringType",
"NumberOfSets",
"FinalSetTiebreakStartsAt"
],
"properties": {
"type": {
"const": "MatchRules"
},
"GameScoringType": {
"$ref": "#/definitions/GameScoringType"
},
"SetScoringType": {
"$ref": "#/definitions/SetScoringType"
},
"FinalSetScoringType": {
"$ref": "#/definitions/SetScoringType"
},
"NumberOfSets": {
"type": "integer"
},
"FinalSetTiebreakStartsAt": {
"type": "integer"
}
}
},
"MatchRules": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/MatchRulesBody"
}
]
},
"MatchSuspendedBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "MatchSuspended"
},
"Reason": {
"type": "string",
"nullable": true
}
}
},
"MatchSuspended": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/MatchSuspendedBody"
}
]
},
"MedicalTreatmentBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "MedicalTreatment"
},
"Competitor": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
}
},
"MedicalTreatment": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/MedicalTreatmentBody"
}
]
},
"MedicalTreatmentCompletedBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "MedicalTreatmentCompleted"
},
"Competitor": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
}
},
"MedicalTreatmentCompleted": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/MedicalTreatmentCompletedBody"
}
]
},
"OverruleBody": {
"type": "object",
"required": [
"type",
"Number"
],
"properties": {
"type": {
"const": "Overrule"
},
"Number": {
"type": "integer"
}
}
},
"Overrule": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/OverruleBody"
}
]
},
"PhysioCalledBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "PhysioCalled"
},
"Competitor": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
}
},
"PhysioCalled": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/PhysioCalledBody"
}
]
},
"PhysioCancelledBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "PhysioCancelled"
},
"Competitor": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
}
},
"PhysioCancelled": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/PhysioCancelledBody"
}
]
},
"PlayersOnCourtBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "PlayersOnCourt"
}
}
},
"PlayersOnCourt": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/PlayersOnCourtBody"
}
]
},
"PointFaultBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "PointFault"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"nullable": true
}
}
},
"PointFault": {
"allOf": [
{
"$ref": "#/definitions/PointMessage"
},
{
"$ref": "#/definitions/PointFaultBody"
}
]
},
"ReliabilityMessageBody": {
"type": "object",
"required": [
"type",
"Reasons"
],
"properties": {
"type": {
"const": "ReliabilityMessage"
},
"Reasons": {
"$ref": "#/definitions/Reasons"
}
}
},
"ReliabilityMessage": {
"allOf": [
{
"$ref": "#/definitions/Message"
},
{
"$ref": "#/definitions/ReliabilityMessageBody"
}
]
},
"PointLetBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "PointLet"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"nullable": true
}
}
},
"PointLet": {
"allOf": [
{
"$ref": "#/definitions/PointMessage"
},
{
"$ref": "#/definitions/PointLetBody"
}
]
},
"PointReplayedBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "PointReplayed"
}
}
},
"PointReplayed": {
"allOf": [
{
"$ref": "#/definitions/PointMessage"
},
{
"$ref": "#/definitions/PointReplayedBody"
}
]
},
"PointScoredBody": {
"type": "object",
"required": [
"type",
"Server",
"Winner",
"Score"
],
"properties": {
"type": {
"const": "PointScored"
},
"Server": {
"$ref": "#/definitions/Server"
},
"NextServer": {
"$ref": "#/definitions/Server",
"nullable": true
},
"Winner": {
"$ref": "#/definitions/Winner"
},
"PointType": {
"$ref": "#/definitions/PointType"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"minItems": 1
}
}
},
"PointScored": {
"allOf": [
{
"$ref": "#/definitions/PointMessage"
},
{
"$ref": "#/definitions/PointScoredBody"
}
]
},
"PointStartedBody": {
"type": "object",
"required": [
"type",
"Server",
"Score"
],
"properties": {
"type": {
"const": "PointStarted"
},
"Server": {
"$ref": "#/definitions/Server"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
}
}
}
},
"PointStarted": {
"allOf": [
{
"$ref": "#/definitions/PointMessage"
},
{
"$ref": "#/definitions/PointStartedBody"
}
]
},
"SetFinishedBody": {
"type": "object",
"required": [
"type",
"Winner",
"SetNumber",
"Score"
],
"properties": {
"type": {
"const": "SetFinished"
},
"Winner": {
"$ref": "#/definitions/Winner"
},
"SetNumber": {
"type": "integer"
},
"Score": {
"type": "array",
"items": {
"$ref": "#/definitions/MatchScore"
},
"minItems": 1
}
}
},
"SetFinished": {
"allOf": [
{
"$ref": "#/definitions/Message"
},
{
"$ref": "#/definitions/SetFinishedBody"
}
]
},
"SwapReceiverBody": {
"type": "object",
"required": [
"type",
"Server",
"NextServer"
],
"properties": {
"type": {
"const": "SwapReceiver"
},
"Server": {
"$ref": "#/definitions/Server"
},
"NextServer": {
"$ref": "#/definitions/Server"
}
}
},
"SwapReceiver": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/SwapReceiverBody"
}
]
},
"SwapServerBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "SwapServer"
},
"Server": {
"$ref": "#/definitions/Server",
"nullable": true
}
}
},
"SwapServer": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/SwapServerBody"
}
]
},
"TimeAnnouncementBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "TimeAnnouncement"
}
}
},
"TimeAnnouncement": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/TimeAnnouncementBody"
}
]
},
"TimePenaltyBody": {
"type": "object",
"required": [
"type",
"Competitor"
],
"properties": {
"type": {
"const": "TimePenalty"
},
"Competitor": {
"$ref": "#/definitions/Competitor"
}
}
},
"TimePenalty": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/TimePenaltyBody"
}
]
},
"TimeViolationBody": {
"type": "object",
"required": [
"type",
"Competitor"
],
"properties": {
"type": {
"const": "TimeViolation"
},
"Competitor": {
"$ref": "#/definitions/Competitor"
},
"Player": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
}
},
"TimeViolation": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/TimeViolationBody"
}
]
},
"ToiletBreakBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "ToiletBreak"
},
"Competitor": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
}
},
"ToiletBreak": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/ToiletBreakBody"
}
]
},
"UmpireOnCourtBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "UmpireOnCourt"
}
}
},
"UmpireOnCourt": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/UmpireOnCourtBody"
}
]
},
"WarmUpCompletedBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "WarmUpCompleted"
}
}
},
"WarmUpCompleted": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/WarmUpCompletedBody"
}
]
},
"WarmUpStartedBody": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "WarmUpStarted"
}
}
},
"WarmUpStarted": {
"allOf": [
{
"$ref": "#/definitions/TennisMessage"
},
{
"$ref": "#/definitions/WarmUpStartedBody"
}
]
},
"MatchOutcome": {
"type": "object",
"required": [
"Winner",
"Reason"
],
"properties": {
"Winner": {
"$ref": "#/definitions/Winner"
},
"Reason": {
"$ref": "#/definitions/MatchFinishedReason"
}
}
},
"Winner": {
"type": "object",
"required": [
"Competitor"
],
"properties": {
"Competitor": {
"$ref": "#/definitions/Competitor"
}
}
},
"Server": {
"type": "object",
"required": [
"Competitor"
],
"properties": {
"Competitor": {
"$ref": "#/definitions/Competitor"
},
"Player": {
"$ref": "#/definitions/Competitor",
"nullable": true
}
},
"example": {
"Competitor": {
"Id": "1"
},
"Player": {
"Id": "2"
}
}
},
"Point": {
"type": "object",
"required": [
"Set",
"GameInSet",
"PointInGame"
],
"properties": {
"Set": {
"type": "integer"
},
"GameInSet": {
"type": "integer"
},
"PointInGame": {
"type": "integer"
}
},
"example": {
"Set": 3,
"GameInSet": 1,
"PointInGame": 1
}
},
"Competitor": {
"type": "object",
"required": [
"Id"
],
"properties": {
"Id": {
"type": "string"
}
},
"example": {
"Id": "1"
}
},
"GameScore": {
"type": "object",
"required": [
"Points"
],
"properties": {
"Points": {
"type": "integer",
"minimum": 0
},
"Score": {
"type": "string",
"nullable": true
}
}
},
"MatchScore": {
"type": "object",
"required": [
"Competitor",
"Sets"
],
"properties": {
"Competitor": {
"$ref": "#/definitions/Competitor"
},
"Sets": {
"type": "array",
"items": {
"$ref": "#/definitions/SetScore"
}
},
"GameScore": {
"$ref": "#/definitions/GameScore",
"nullable": true
}
},
"example": [
{
"Competitor": {
"Id": "1"
},
"Sets": [
{
"Games": 6,
"TiebreakScore": 0
},
{
"Games": 7,
"TiebreakScore": 6
}
],
"GameScore": {
"Points": 15
}
},
{
"Competitor": {
"Id": "2"
},
"Sets": [
{
"Games": 3,
"TiebreakScore": 0
},
{
"Games": 5,
"TiebreakScore": 2
}
],
"GameScore": {
"Points": 30
}
}
]
},
"SetScore": {
"type": "object",
"required": [
"Games"
],
"properties": {
"Games": {
"type": "integer"
},
"TiebreakScore": {
"type": "integer",
"nullable": true
}
}
},
"ScoringFormat": {
"type": "object",
"required": [
"GameScoringType",
"SetScoringType",
"FinalSetScoringType",
"NumberOfSets",
"FinalSetTiebreakStartsAt"
],
"properties": {
"GameScoringType": {
"$ref": "#/definitions/GameScoringType"
},
"SetScoringType": {
"$ref": "#/definitions/SetScoringType"
},
"FinalSetScoringType": {
"$ref": "#/definitions/SetScoringType"
},
"NumberOfSets": {
"type": "integer"
},
"FinalSetTiebreakStartsAt": {
"type": "integer"
}
}
},
"Reasons": {
"type": "object",
"required": [
"Reliable",
"Unreliable"
],
"properties": {
"Reliable": {
"type": "array",
"items": {
"type": "string"
}
},
"Unreliable": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"FaultType": {
"type": "string",
"enum": [
"Fault",
"FootFault"
]
},
"GameScoringType": {
"type": "string",
"enum": [
"Standard",
"StandardNoAd"
]
},
"GameType": {
"type": "string",
"enum": [
"StandardGame",
"StandardTiebreak",
"MatchTiebreak"
]
},
"MatchFinishedReason": {
"type": "string",
"enum": [
"Normally",
"Injury",
"Illness",
"Retirement",
"Default",
"CodeViolation",
"Walkover",
"Lateness",
"NoShow"
]
},
"MatchStatusType": {
"type": "string",
"enum": [
"NotStarted",
"InProgress",
"Suspended",
"Finished",
"UmpireOnCourt",
"PlayersOnCourt",
"WarmUpStarted",
"WarmUpCompleted",
"BallMarkInspection",
"ToiletBreak",
"MedicalTreatment",
"MedicalTreatmentCompleted",
"PhysioCalled",
"PhysioCancelled",
"PointLet",
"ChallengeInProgress"
]
},
"PointType": {
"type": "string",
"enum": [
"Unknown",
"Standard",
"Fault",
"FootFault",
"DoubleFault",
"Ace"
]
},
"SetScoringType": {
"type": "string",
"enum": [
"Tiebreak",
"MatchTiebreak",
"Advantage"
]
}
}
}