commit 527cc0ea71a9eec4f0228172e4b5a858f6a992b0
parent b333acd38ded39119e907266af5f0816a623fb74
Author: Lynn Foster <foster.j.lynn@gmail.com>
Date: Fri, 8 Dec 2017 11:04:19 -0600
Merge pull request #249 from valueflows/json-schemas
Fixed all syntax on what was done so far.
Diffstat:
4 files changed, 42 insertions(+), 36 deletions(-)
diff --git a/json-schemas/Agent.json b/json-schemas/Agent.json
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json",
"title": "Agent",
"description": "A person or group or organization with economic agency.",
"type": "object",
@@ -9,11 +10,16 @@
"type": "string"
},
"image": {
- "type": "uri"
+ "type": "string",
+ "format": "uri"
+ },
+ "url": {
+ "type": "string",
+ "format": "uri"
},
"primaryLocation": {
"description": "The main place an agent is located, often an address where activities occur and mail can be sent. This is usually a mappable geographic location. It also could be a website address, as in the case of agents who have no physical location.",
- "type": "Place"
+ "type": "object"
},
"note": {
"description": "A textual comment or description.",
@@ -23,11 +29,11 @@
"description": "Relationships with other agents.",
"type": "array",
"items": {
- "type": "AgentRelationship"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/AgentRelationship.json"
},
"minItems": 1,
"uniqueItems": true
- },
+ }
},
"required": ["name"]
-}-
\ No newline at end of file
+}
diff --git a/json-schemas/AgentRelationship.json b/json-schemas/AgentRelationship.json
@@ -1,21 +1,22 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/AgentRelationship.json",
"title": "AgentRelationship",
"description": "An ongoing voluntary association between 2 Agents of any kind.",
"type": "object",
"properties": {
"subject": {
"description": "The subject of a relationship between 2 agents.",
- "type": "Agent"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json"
},
"relationship": {
"description": "A kind of relationship that exists between 2 agents.",
- "type": "AgentRelationshipRole"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/AgentRelationshipRole.json"
},
"object": {
"description": "The object of a relationship between 2 agents.",
- "type": "Agent"
- },
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json"
+ }
},
"required": ["subject", "relationship", "object"]
-}-
\ No newline at end of file
+}
diff --git a/json-schemas/EconomicEvent.json b/json-schemas/EconomicEvent.json
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicEvent.json",
"title": "EconomicEvent",
"description": "An inflow or outflow of an economic resource in relation to a process and/or exchange.",
"type": "object",
@@ -10,27 +11,28 @@
},
"affectedQuantity": {
"description": "The quantity and unit of the event. This is the quantity that could be used to increment or decrement a resource, depending on the type of resource and type of event.",
- "type": "QuantityValue"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json"
},
"affects": {
"description": "The economic resource that is decremented or incremented by the economic event, or just what the economic event is about.",
- "type": "EconomicResource"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json"
},
"provider": {
"description": "The economic agent from whom the economic event is initiated.",
- "type": "Agent"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json"
},
"receiver": {
"description": "The economic agent whom the economic event is for.",
- "type": "Agent"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json"
},
"start": {
"description": "The starting date and optionally time of the economic event.",
- "type": "??"
+ "type": "string",
+ "format": "date-time"
},
"duration": {
"description": "The observed duration of the economic event.",
- "type": "??"
+ "type": "object"
},
"note": {
"description": "A textual comment or description.",
@@ -38,17 +40,17 @@
},
"inputOf": {
"description": "The process for which this economic event describes an input.",
- "type": "Process"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Process.json"
},
"outputOf": {
"description": "The process for which this economic event describes an output.",
- "type": "Process"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Process.json"
},
"fulfills": {
"description": "References a commitment which is completely or partially fulfilled by an economic event.",
"type": "array",
"items": {
- "type": "Fulfillment"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Fulfillment.json"
},
"minItems": 1,
"uniqueItems": true
@@ -57,23 +59,23 @@
"description": "References a commitment that was fully or partially created because of the economic event, often based on a prior agreement.",
"type": "array",
"items": {
- "type": "Reciprocity"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Reciprocity.json"
},
"minItems": 1,
"uniqueItems": true
},
"appreciationOf": {
"description": "The economic event being appreciated (gift economy).",
- "type": "Appreciation"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Appreciation.json"
},
"appreciationWith": {
"description": "The economic event implemented in appreciation (gift economy).",
- "type": "Appreciation"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Appreciation.json"
},
"under": {
"description": "Reference to an agreement between agents which specifies the rules or policies which govern this event.",
- "type": "Agreement"
- },
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agreement.json"
+ }
},
"required": ["action", "affectedQuantity", "start", "affects" ]
-}-
\ No newline at end of file
+}
diff --git a/json-schemas/EconomicResource.json b/json-schemas/EconomicResource.json
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json",
"title": "EconomicResource",
"description": "A resource which is useful to people or the ecosystem.",
"type": "object",
@@ -10,11 +11,11 @@
},
"quantity": {
"description": "The current amount and unit of the economic resource.",
- "type": "QuantityValue"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json"
},
"resourceClassifiedAs": {
"description": "A resource's primary classification, as part of describing that resource.",
- "type": "ResourceClassification"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/ResourceClassification.json"
},
"trackingIdentifier": {
"description": "Sometimes called lot number, used for trackable batched resources. Sometimes called serial number, used when each item must have a trackable identifier (like a computer). Could also be used for other unique tracking identifiers needed for resources.",
@@ -22,7 +23,7 @@
},
"currentLocation": {
"description": "The current place an economic resource is located. Could be at any level of granularity, from a town to an address to a warehouse location. Should be mappable.",
- "type": "Place"
+ "type": "object"
},
"note": {
"description": "A textual comment or description.",
@@ -30,12 +31,12 @@
},
"contains": {
"description": "Used when a stock economic resource contains items also defined as economic resources.",
- "type": "EconomicResource"
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json"
},
"underlyingResource": {
"description": "A more concrete resource upon which a resource is based.",
- "type": "EconomicResource"
- },
+ "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json"
+ }
},
"required": ["resourceClassifiedAs" ]
-}-
\ No newline at end of file
+}