{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/api-evangelist/unity/main/json-schema/unity-leaderboard-schema.json", "title": "Unity Leaderboard", "description": "Schema for a Unity Gaming Services leaderboard configuration.", "type": "object", "properties": { "id": { "type": "string", "description": "Unique leaderboard identifier" }, "name": { "type": "string", "description": "Display name for the leaderboard" }, "sortOrder": { "type": "string", "enum": ["asc", "desc"], "description": "Sort order: asc for lowest-wins, desc for highest-wins" }, "bucketSize": { "type": "number", "description": "Score range per bucket for bucketed leaderboards" }, "resetConfig": { "type": "object", "description": "Configuration for periodic leaderboard resets", "properties": { "start": { "type": "string", "format": "date-time" }, "schedule": { "type": "string", "description": "Cron expression for reset schedule" }, "archive": { "type": "boolean", "description": "Whether to archive scores before reset" } } }, "tieringConfig": { "type": "object", "description": "Configuration for tiered/division-based leaderboards", "properties": { "strategy": { "type": "string", "enum": ["score", "percentile"] }, "tiers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "cutoff": { "type": "number" } } } } } }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" } }, "required": ["id", "sortOrder"] }