Skip to content

Commit

Permalink
feat: added id desc
Browse files Browse the repository at this point in the history
feat: added archive
fix: additional prop
  • Loading branch information
xgui3783 committed May 23, 2024
1 parent b165091 commit fd4e89c
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"archive_type": {
"$ref": "#/definitions/archive_type"
"@type": {
"const": "siibra/attr/data/archive/v0.1"
},
"archive_file": {
"url": {
"type": "string"
},
"archive_type": {
"$ref": "#/definitions/archive_type"
}
},
"definitions": {
Expand Down
15 changes: 10 additions & 5 deletions siibra/attr/data/image/v0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"url": {
"type": "string"
},
"key": {
"type": "string"
},
"space_id": {
"type": "string"
}
Expand All @@ -29,11 +26,19 @@
{
"const": "neuroglancer/precomputed"
},
{
"const": "neuroglancer/precompmesh"
},
{
"const": "nii"
},
{
"const": "gii-mesh"
},
{
"const": "gii-label"
}
]
}
},
"additionalProperties": false
}
}
3 changes: 3 additions & 0 deletions siibra/attr/data/tabular/v0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"@type": {
"const": "siibra/attr/data/tabular/v0.1"
},
"url": {
"type": "string"
},
"format": {
"$ref": "#/definitions/format"
},
Expand Down
26 changes: 22 additions & 4 deletions siibra/attr/data/v0.1.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
"allOf": [
{
"$ref": "urn:siibra-local:siibra/attr/data/image/v0.1.json"
"$ref": "#/definitions/base"
},
{
"$ref": "urn:siibra-local:siibra/attr/data/tabular/v0.1.json"
"$ref": "urn:siibra-local:siibra/attr/util/archived/v0.1.json"
},
{
"$ref": "urn:siibra-local:siibra/attr/util/has_key/v0.1.json"
}
],
"definitions": {
"base": {
"oneOf": [
{
"$ref": "urn:siibra-local:siibra/attr/data/image/v0.1.json"
},
{
"$ref": "urn:siibra-local:siibra/attr/data/tabular/v0.1.json"
},
{
"$ref": "urn:siibra-local:siibra/attr/data/archive/v0.1.json"
}
]
}
]
}
}
15 changes: 15 additions & 0 deletions siibra/attr/desc/id/v0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"allOf": [
{
"$ref": "urn:siibra-local:siibra/attr/util/humanreadable/v0.1.json"
}
],
"properties": {
"@type": {
"const": "siibra/attr/desc/id/v0.1"
}
},
"required": ["@type"]
}
3 changes: 3 additions & 0 deletions siibra/attr/desc/v0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
},
{
"$ref": "urn:siibra-local:siibra/attr/desc/speciesspec/v0.1.json"
},
{
"$ref": "urn:siibra-local:siibra/attr/desc/id/v0.1.json"
}
]
}
28 changes: 28 additions & 0 deletions siibra/attr/util/archived/v0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"archive_options": {
"oneOf": [
{
"$ref": "#/definitions/archive"
},
{
"$ref": "#/definitions/segment"
}
]
}
},
"definitions": {
"archive": {
"file": {
"type": "string"
}
},
"segment": {
"label": {
"type": "number"
}
}
}
}
9 changes: 9 additions & 0 deletions siibra/attr/util/has_key/v0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"key": {
"type": "string"
}
}
}

0 comments on commit fd4e89c

Please sign in to comment.