From cee1900e885dcea099bdd15eb4ac0372f022ff7d Mon Sep 17 00:00:00 2001 From: James Muscat Date: Thu, 18 Dec 2014 14:47:36 +0000 Subject: [PATCH] By popular request, add optional supply/demand properties; clarify what the sell and buy prices are; give timestamp a format restriction. --- schemas/commodity-v0.1.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/schemas/commodity-v0.1.json b/schemas/commodity-v0.1.json index 44ff808..ecba7cd 100644 --- a/schemas/commodity-v0.1.json +++ b/schemas/commodity-v0.1.json @@ -54,6 +54,7 @@ "buyPrice": { "id": "#buyPrice", "type": "integer", + "description": "Price to buy from the market", "additionalProperties": false }, "stationStock": { @@ -61,9 +62,13 @@ "type": "integer", "additionalProperties": false }, + "supplyLevel": { + "$ref": "#/definitions/levelType" + }, "sellPrice": { "id": "#sellPrice", "type": "integer", + "description": "Price to sell to the market", "additionalProperties": false }, "demand": { @@ -71,9 +76,13 @@ "type": "integer", "additionalProperties": false }, + "demandLevel": { + "$ref": "#/definitions/levelType" + }, "timestamp": { "id": "#timestamp", "type": "string", + "format": "date-time", "additionalProperties": false } }, @@ -93,5 +102,10 @@ "$schemaRef", "header", "message" - ] + ], + "definitions" : { + "levelType" : { + "enum": ["Low", "Med", "High"] + } + } } \ No newline at end of file