Skip to content
Snippets Groups Projects
Commit e79936f8 authored by Justin Ehlert's avatar Justin Ehlert
Browse files

Refactor JSON Schemas and remove ABAO

parent 68a07fb0
No related branches found
No related tags found
No related merge requests found
Showing
with 64 additions and 408 deletions
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties":{
"analysis":{
"type":"object",
"allOf":[{"$ref":"../definitions/analysis.json#/definitions/analysis-input"}],
"required":["label"]
"allOf": [{"$ref":"../definitions/analysis.json#/definitions/analysis-job"}],
"example": {
"analysis": {
"label": "Test Analysis 1"
},
"job":{
"type":"object"
"job" : {
"gear_id": "dcm_convert",
"inputs": {
"dicom": {
"type": "acquisition",
"id": "57081d06b386a6dc79ca386b",
"name" : "test_acquisition_dicom.zip"
}
},
"tags": ["example"]
}
}
}
......@@ -4,6 +4,12 @@
"type": "object",
"allOf": [{"$ref": "../definitions/collection.json#/definitions/collection-input-with-contents"}],
"example": {
"$ref": "../../examples/input/collection-update.json"
}
"contents": {
"operation": "add",
"nodes": [{
"level": "session",
"_id": "57dc50b0931cefd8ac2a371e"
}]
}
}
}
......@@ -5,6 +5,7 @@
"allOf": [{"$ref": "../definitions/collection.json#/definitions/collection-input"}],
"required": ["label"],
"example": {
"$ref": "../../examples/input/collection.json"
"label":"control-group",
"description":"Control group collection"
}
}
......@@ -2,6 +2,12 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"allOf":[{"$ref":"../definitions/device.json#/definitions/device-input"}],
"example": {
"$ref": "../../examples/input/device.json"
}
"info": {
"basic": "info"
},
"errors": [
"An Error"
],
"interval": 400
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"filterDefinition": {
"type": "object",
"properties": {
"+": {"$ref": "#/definitions/filterItems"},
"plus": {"$ref": "#definitions/filterItems"},
"-": {"$ref": "#/definitions/filterItems"},
"minus": {"$ref": "#definitions/filterItems"}
},
"additionalProperties": false
},
"filterItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
},
"title": "Download",
"type": "object",
"$ref": "../definitions/download.json#/definitions/download-input",
"example": {
"$ref": "../../examples/create_download_incomplete_and_dicom.json"
},
"properties": {
"optional": {
"type": "boolean"
},
"nodes": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"level": {
"type": "string",
"enum": ["project", "session", "acquisition", "analysis"]
},
"_id": {
"type": "string",
"pattern": "^[0-9a-f]{24}$"
}
},
"required": ["level", "_id"],
"additionalProperties": false
}
},
"filters": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"tags": {"$ref": "#/definitions/filterDefinition"},
"types": {"$ref": "#/definitions/filterDefinition"}
}
}
}
},
"required": ["optional", "nodes"],
"additionalProperties": false
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EngineMetadata",
"type": "object",
"properties": {
"project": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": ["string", "null"]},
"info": {"type": ["object", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false
},
"session": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": ["string", "null"]},
"info": {"type": ["object", "null"]},
"operator": {"type": ["string", "null"]},
"uid": {"type": ["string", "null"]},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"subject": {"$ref": "subject.json"},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false
},
"acquisition": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": ["string", "null"]},
"info": {"type": ["object", "null"]},
"metadata": {"type": ["object", "null"]},
"measurement": {"type": ["string", "null"]},
"instrument": {"type": ["string", "null"]},
"uid": {"type": ["string", "null"]},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
"$ref": "../definitions/enginemetadata.json#/definitions/engine-upload-input"
}
......@@ -5,6 +5,7 @@
],
"required": ["_id"],
"example": {
"$ref": "../../examples/input/group-new.json"
}
"label": "Example Group",
"_id": "example_group"
}
}
......@@ -2,6 +2,6 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"allOf":[{"$ref":"../definitions/group.json#/definitions/group-input"}],
"example": {
"$ref": "../../examples/input/group-update.json"
}
"label":"New group label"
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Helper endpoint for editing an object's info key",
"type": "object",
"oneOf": [
{
"properties": {
"set": {"type": "object", "minProperties": 1},
"delete": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "string"
}
}
}, "additionalProperties": false
},
{
"properties": {
"replace": {"type": "object"}
}, "additionalProperties": false
}
]
"$ref": "../definitions/info.json#/definitions/info-update-input"
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EngineMetadata",
"type": "object",
"properties": {
"group": {
"type": "object",
"properties": {
"_id": {"type": "string"}
},
"additionalProperties": false,
"required": ["_id"]
},
"project": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": "string"},
"info": {"type": ["object", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["label"]
},
"session": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": "string"},
"info": {"type": ["object", "null"]},
"operator": {"type": ["string", "null"]},
"uid": {"type": ["string", "null"]},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"subject": {"$ref": "subject.json"},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["label"]
},
"acquisition": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": "string"},
"info": {"type": ["object", "null"]},
"uid": {"type": ["string", "null"]},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["label"]
}
},
"required": ["group", "project"],
"additionalProperties": false
"$ref": "../definitions/enginemetadata.json#/definitions/label-upload-input"
}
......@@ -4,6 +4,6 @@
"allOf":[{"$ref":"../definitions/note.json#/definitions/note-input"}],
"required": ["text"],
"example": {
"$ref": "../../examples/input/note.json"
}
"text":"Scitran core!"
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Packfile",
"type": "object",
"properties": {
"project": {
"type": "object",
"properties": {
"_id": {"type": "string"}
},
"additionalProperties": false,
"required": ["_id"]
},
"session": {
"type": "object",
"properties": {
"label": {"type": "string"},
"subject": {"$ref": "subject.json"}
},
"additionalProperties": false,
"required": ["label"]
},
"acquisition": {
"type": "object",
"properties": {
"label": {"type": "string"},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": "string"}
},
"additionalProperties": false,
"required": ["label"]
},
"packfile": {
"type": "object",
"properties": {
"type": {"type": "string"}
},
"additionalProperties": false,
"required": ["type"]
}
},
"required": ["project", "session", "acquisition", "packfile"],
"additionalProperties": false
"$ref": "../definitions/packfile.json#/definitions/packfile-input"
}
......@@ -5,6 +5,7 @@
"key_fields": ["_id"],
"required": ["_id", "access"],
"example": {
"$ref": "../../examples/input/permission.json"
}
"_id":"coltonlw@flywheel.io",
"access":"admin"
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"node_type": {
"type": "string",
"enum": ["project", "session", "acquisition", "file", "note"]
},
"rel_type": {
"type": "string",
"enum": ["target", "parent", "child"]
},
"query": {"type": "object"},
"relations": {
"type": "array",
"items": {"$ref": "#"}
}
},
"additionalProperties": false,
"required": ["node_type", "rel_type", "query", "relations"]
}
......@@ -2,6 +2,6 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"allOf":[{"$ref":"../definitions/tag.json#/definitions/tag"}],
"example": {
"$ref": "../../examples/input/tag.json"
}
"value":"example-tag"
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EngineMetadata",
"type": "object",
"properties": {
"project": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": "string"},
"info": {"type": ["object", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false
},
"session": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": ["string", "null"]},
"info": {"type": ["object", "null"]},
"operator": {"type": ["string", "null"]},
"uid": {"type": "string"},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"subject": {"$ref": "subject.json"},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["uid"]
},
"acquisition": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": ["string", "null"]},
"info": {"type": ["object", "null"]},
"uid": {"type": "string"},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["uid"]
}
},
"required": ["acquisition", "session"],
"additionalProperties": false
"$ref": "../definitions/enginemetadata.json#/definitions/uid-match-upload-input"
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EngineMetadata",
"type": "object",
"properties": {
"group": {
"type": "object",
"properties": {
"_id": {"type": "string"}
},
"additionalProperties": false,
"required": ["_id"]
},
"project": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": "string"},
"info": {"type": ["object", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["label"]
},
"session": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": ["string", "null"]},
"info": {"type": ["object", "null"]},
"operator": {"type": ["string", "null"]},
"uid": {"type": "string"},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"subject": {"$ref": "subject.json"},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["uid"]
},
"acquisition": {
"type": "object",
"properties": {
"public": {"type": ["boolean", "null"]},
"label": {"type": ["string", "null"]},
"info": {"type": ["object", "null"]},
"uid": {"type": "string"},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": ["string", "null"]},
"files": {
"type": ["array", "null"],
"items": {"$ref": "file.json"}
}
},
"additionalProperties": false,
"required": ["uid"]
}
},
"required": ["acquisition", "group", "project", "session"],
"additionalProperties": false
"$ref": "../definitions/enginemetadata.json#/definitions/uid-upload-input"
}
......@@ -4,6 +4,10 @@
"allOf":[{"$ref":"../definitions/user.json#/definitions/user-input"}],
"required":["_id", "firstname", "lastname"],
"example": {
"$ref": "../../examples/input/user-new.json"
}
"_id": "jane.doe@gmail.com",
"firstname": "Jane",
"lastname": "Doe",
"email": "jane.doe@gmail.com",
"root": false
}
}
......@@ -6,6 +6,8 @@
{"$ref":"../definitions/user.json#/definitions/user-input"}
],
"example": {
"$ref": "../../examples/input/user-update.json"
}
"firstname": "Jane",
"lastname": "Smith",
"email": "jane.smith@gmail.com"
}
}
......@@ -5,7 +5,7 @@
"properties":{
"firstname":{"$ref":"../definitions/user.json#/definitions/firstname"},
"lastname":{"$ref":"../definitions/user.json#/definitions/lastname"},
"_id":{"$ref":"../definitions/user.json#/definitions/_id"}
"_id":{"$ref":"../definitions/common.json#/definitions/user-id"}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment