diff --git a/assets/schema.json b/assets/schema.json index e69de29..c33fab2 100644 --- a/assets/schema.json +++ b/assets/schema.json @@ -0,0 +1,137 @@ + + +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "games": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "players": { + "type": "null" + }, + "group": { + "type": "null" + }, + "winner": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "players", + "group", + "winner" + ] + } + ] + }, + "groups": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "members": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "id", + "name", + "members" + ] + } + ] + }, + "players": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "games", + "groups", + "players" + ] +} +