commit b333acd38ded39119e907266af5f0816a623fb74
parent 65ee11ffdbc48dccaa8ef43f4f5f897cd652c83b
Author: Lynn Foster <foster.j.lynn@gmail.com>
Date: Thu, 7 Dec 2017 18:42:02 -0600
Merge pull request #248 from valueflows/json-schemas
Json schemas - Agent, AgentRelationship
Diffstat:
3 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/json-schemas/Agent.json b/json-schemas/Agent.json
@@ -0,0 +1,33 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "title": "Agent",
+ "description": "A person or group or organization with economic agency.",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "An informal or formal textual identifier for an object. Does not imply uniqueness.",
+ "type": "string"
+ },
+ "image": {
+ "type": "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"
+ },
+ "note": {
+ "description": "A textual comment or description.",
+ "type": "string"
+ },
+ "relationships": {
+ "description": "Relationships with other agents.",
+ "type": "array",
+ "items": {
+ "type": "AgentRelationship"
+ },
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ },
+ "required": ["name"]
+}+
\ No newline at end of file
diff --git a/json-schemas/AgentRelationship.json b/json-schemas/AgentRelationship.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "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"
+ },
+ "relationship": {
+ "description": "A kind of relationship that exists between 2 agents.",
+ "type": "AgentRelationshipRole"
+ },
+ "object": {
+ "description": "The object of a relationship between 2 agents.",
+ "type": "Agent"
+ },
+ },
+ "required": ["subject", "relationship", "object"]
+}+
\ No newline at end of file
diff --git a/json-schemas/EconomicResource.json b/json-schemas/EconomicResource.json
@@ -37,5 +37,5 @@
"type": "EconomicResource"
},
},
- "required": ["action", "affectedQuantity", "start", "affects" ]
+ "required": ["resourceClassifiedAs" ]
}
\ No newline at end of file