Files
browser/plugins/examples/scum-server-plugin/schemas/bridge/players.snapshot.schema.json
T

74 lines
2.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayersSnapshot",
"type": "object",
"additionalProperties": false,
"required": ["observedAt", "players"],
"properties": {
"observedAt": {
"type": "string",
"maxLength": 64,
"format": "date-time"
},
"players": {
"type": "array",
"maxItems": 1000,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["playerId", "playerName", "status"],
"properties": {
"playerId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,96}$"
},
"playerName": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"status": {
"type": "string",
"enum": ["online", "offline", "unknown"]
},
"squadId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,96}$"
},
"pingMs": {
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"lastSeenAt": {
"type": "string",
"maxLength": 64,
"format": "date-time"
},
"position": {
"type": "object",
"additionalProperties": false,
"required": ["x", "y", "z"],
"properties": {
"x": { "type": "number", "minimum": -2000000, "maximum": 2000000 },
"y": { "type": "number", "minimum": -2000000, "maximum": 2000000 },
"z": { "type": "number", "minimum": -2000000, "maximum": 2000000 }
}
},
"tags": {
"type": "array",
"maxItems": 16,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"pattern": "^[A-Za-z0-9_.:-]+$"
}
}
}
}
}
}
}