From be7f82878e5501c890811b4be660c8805cf11836 Mon Sep 17 00:00:00 2001 From: Space Admiral Date: Sat, 24 Dec 2022 14:30:13 -0500 Subject: [PATCH] add exchange property to market --- models/Market.json | 26 +++++++++++--------------- models/TradeGood.json | 16 ++++++++-------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/models/Market.json b/models/Market.json index dca15cf..e1a97e8 100644 --- a/models/Market.json +++ b/models/Market.json @@ -10,26 +10,21 @@ "type": "array", "description": "The list of goods that are exported from this market.", "items": { - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "The symbol of the good." - } - } + "$ref": "./TradeGood.json" } }, "imports": { "type": "array", "description": "The list of goods that are sought as imports in this market.", "items": { - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "The symbol of the good." - } - } + "$ref": "./TradeGood.json" + } + }, + "exchange": { + "type": "array", + "description": "The list of goods that are bought and sold between agents at this market.", + "items": { + "$ref": "./TradeGood.json" } }, "transactions": { @@ -50,6 +45,7 @@ "required": [ "symbol", "exports", - "imports" + "imports", + "exchange" ] } \ No newline at end of file diff --git a/models/TradeGood.json b/models/TradeGood.json index e1af4ee..f5bb7ec 100644 --- a/models/TradeGood.json +++ b/models/TradeGood.json @@ -1,6 +1,6 @@ { "type": "object", - "attributes": { + "properties": { "symbol": { "$ref": "./TradeSymbol.json" }, @@ -9,11 +9,11 @@ }, "description": { "type": "string" - }, - "required": [ - "symbol", - "name", - "description" - ] - } + } + }, + "required": [ + "symbol", + "name", + "description" + ] } \ No newline at end of file