-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
162 lines (162 loc) · 4.76 KB
/
schema.json
File metadata and controls
162 lines (162 loc) · 4.76 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Template Convention",
"description": "Schema for Template Zarr convention, supporting both key-prefixed and nested namespace patterns",
"type": "object",
"properties": {
"zarr_format": {
"type": "integer",
"description": "Zarr format version"
},
"node_type": {
"type": "string",
"enum": ["array", "group"],
"description": "Type of Zarr node"
},
"attributes": {
"type": "object",
"description": "Zarr attributes containing convention metadata and properties",
"properties": {
"zarr_conventions": {
"type": "array",
"description": "Array of convention metadata objects",
"contains": {
"$ref": "#/$defs/conventionMetadata"
}
}
},
"required": ["zarr_conventions"],
"oneOf": [
{
"$ref": "#/$defs/keyPrefixedAttributes"
},
{
"$ref": "#/$defs/nestedAttributes"
}
]
}
},
"required": ["zarr_format", "node_type", "attributes"],
"additionalProperties": true,
"$defs": {
"conventionMetadata": {
"type": "object",
"description": "Template convention metadata object for use in zarr_conventions array",
"properties": {
"schema_url": {
"type": "string",
"const": "https://raw.githubusercontent.com/zarr-conventions/template/refs/tags/v1/schema.json",
"description": "URL to the JSON Schema definition for this convention"
},
"spec_url": {
"type": "string",
"const": "https://github.com/zarr-conventions/template/blob/v1/README.md",
"description": "URL to the full specification document"
},
"uuid": {
"type": "string",
"const": "00000000-0000-0000-0000-000000000000",
"description": "UUID that permanently identifies this convention"
},
"name": {
"type": "string",
"description": "Human-readable name of the convention. Should be 'template:' for key-prefixed pattern or 'template' for nested pattern"
},
"description": {
"type": "string",
"const": "Template convention for demonstrating Zarr convention metadata structure",
"description": "Brief description of the convention's purpose and usage"
}
},
"anyOf": [
{
"required": ["schema_url"]
},
{
"required": ["spec_url"]
},
{
"required": ["uuid"]
}
],
"additionalProperties": false
},
"conventionProperties": {
"type": "object",
"description": "Template convention properties",
"properties": {
"new_field": {
"type": "string",
"description": "REQUIRED. Describe the required field..."
},
"xyz": {
"$ref": "#/$defs/xyzObject"
},
"another_one": {
"type": "array",
"description": "Array of numeric values",
"items": {
"type": "number"
}
}
},
"required": ["new_field"],
"additionalProperties": false
},
"xyzObject": {
"type": "object",
"description": "XYZ Object containing x, y, z coordinates",
"properties": {
"x": {
"type": "number",
"description": "REQUIRED. X coordinate value"
},
"y": {
"type": "number",
"description": "REQUIRED. Y coordinate value"
},
"z": {
"type": "number",
"description": "REQUIRED. Z coordinate value"
}
},
"required": ["x", "y", "z"],
"additionalProperties": false
},
"keyPrefixedAttributes": {
"type": "object",
"description": "Template convention using key-prefixed pattern (e.g., template:new_field)",
"properties": {
"zarr_conventions": true,
"template:new_field": {
"type": "string",
"description": "REQUIRED. Describe the required field..."
},
"template:xyz": {
"$ref": "#/$defs/xyzObject"
},
"template:another_one": {
"type": "array",
"description": "Array of numeric values",
"items": {
"type": "number"
}
}
},
"required": ["template:new_field"],
"additionalProperties": true
},
"nestedAttributes": {
"type": "object",
"description": "Template convention using nested pattern (single 'template' key)",
"properties": {
"zarr_conventions": true,
"template": {
"$ref": "#/$defs/conventionProperties"
}
},
"required": ["template"],
"additionalProperties": true
}
}
}