-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentity_type.schema.json
More file actions
108 lines (108 loc) · 3.33 KB
/
entity_type.schema.json
File metadata and controls
108 lines (108 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "EntityType",
"type": "object",
"required": ["name", "description"],
"properties": {
"name": {
"type": "string",
"description": "The name of the entity type."
},
"description": {
"type": "string",
"description": "A description of the entity type."
},
"properties": {
"type": "object",
"description": "Properties of the entity type.",
"additionalProperties": { "$ref": "#/definitions/ConceptProperty" }
},
"interfaces": {
"type": "object",
"description": "Interface assignments for this entity type.",
"additionalProperties": { "$ref": "#/definitions/InterfaceAssignment" }
}
},
"definitions": {
"InterfaceAssignment": {
"type": "object",
"properties": {
"inputs": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/InterfaceInputField" }
},
"outputs": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/InterfaceOutputField" }
}
},
"additionalProperties": false
},
"InterfaceInputField": {
"type": "object",
"properties": {
"description": { "type": "string" },
"type": { "type": "string" },
"default": { "type": ["string", "number", "boolean"], "description": "Default value for the input." },
"kind": {
"type": "string",
"enum": ["discrete", "continuous"],
"description": "The type of interface: 'discrete' or 'continuous'."
}
},
"required": ["description", "type", "default", "kind"],
"additionalProperties": false
},
"InterfaceOutputField": {
"type": "object",
"properties": {
"description": { "type": "string" },
"type": { "type": "string" },
"kind": {
"type": "string",
"enum": ["discrete", "continuous"],
"description": "The type of interface: 'discrete' or 'continuous'."
},
"mapping": {
"type": "object",
"description": "Map from possible output values to expressions.",
"additionalProperties": { "type": "string" }
},
"default": { "type": ["string", "number", "boolean"], "description": "Default value for the output." }
},
"required": ["description", "type", "kind"],
"additionalProperties": false
},
"ConceptProperty": {
"title": "ConceptProperty",
"type": "object",
"required": ["description", "type"],
"properties": {
"description": {
"type": "string",
"description": "Description of the property."
},
"type": {
"type": "string",
"description": "Type of the property (e.g., boolean, time, or name of a concept)."
},
"min": {
"oneOf": [
{"type": "integer", "minimum": 0},
{"type": "string", "enum": ["unbounded"]}
],
"description": "Minimum cardinality."
},
"max": {
"oneOf": [
{"type": "integer", "minimum": 0},
{"type": "string", "enum": ["unbounded"]}
],
"description": "Maximum cardinality."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}