From e9693380d952552319b2cdd3f183e2e676676f95 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Mon, 23 Oct 2017 22:01:18 +0100 Subject: Add deal file parsing and verifying --- resources/input-file-schema.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 resources/input-file-schema.json (limited to 'resources/input-file-schema.json') diff --git a/resources/input-file-schema.json b/resources/input-file-schema.json new file mode 100644 index 0000000..2086eb0 --- /dev/null +++ b/resources/input-file-schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "card": { + "type": "string", + "pattern": "^(?i)([A|[1-9]|1[0-3]|J|Q|K])([C|D|H|S])$" + } + }, + "type": "object", + "properties": { + "tableau piles": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/card" + } + } + }, + "hole cards": { + "type": "array", + "items": { + "$ref": "#/definitions/card" + } + } + }, + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "tableau piles" + ] + } + ] +} \ No newline at end of file -- cgit v1.2.1