Skip to content
Snippets Groups Projects
Commit 8fd1965d authored by Colton Leekley-Winslow's avatar Colton Leekley-Winslow
Browse files

Add RAML for ContainerHandler based routes

parent 600d5625
No related branches found
No related tags found
No related merge requests found
Showing
with 432 additions and 221 deletions
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions":{
"curator": {"type": "string"},
"collection-output":{
"type": "object",
"properties": {
"_id":{"$ref":"../definitions/objectid.json#"},
"public": {"$ref": "../definitions/container.json#/definitions/public"},
"label": {"$ref": "../definitions/container.json#/definitions/label"},
"metadata": {"$ref": "../definitions/container.json#/definitions/metadata"},
"curator": {"$ref": "#/definitions/curator"},
"created":{"$ref":"../definitions/created-modified.json#/definitions/created"},
"modified":{"$ref":"../definitions/created-modified.json#/definitions/modified"},
"permissions":{
"type":"array",
"items":{"$ref":"../definitions/permission.json#"}
}
},
"additionalProperties":false
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"_id": {"type": "string"},
"public": {"type": "boolean"},
"archived": {"type": "boolean"},
"label": {"type": "string", "minLength": 1, "maxLength": 256},
"metadata": {"type": "object"}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"definitions":{
"created": {
"type": "string"
},
"modified": {
"type": "string"
}
},
"properties": {
"created": {"$ref":"#/definitions/created"},
"modified": {"$ref":"#/definitions/modified"}
}
}
{
"definitions":{
"name": { "type": "string" },
"file-type": { "type": "string" },
"mimetype": { "type": "string" },
"instrument": { "type": "string" },
"measurements": {
"items": { "type": "string"},
"type": "array",
"uniqueItems": true
},
"tags": {
"items": { "type": "string"},
"type": "array",
"uniqueItems": true
},
"metadata": {
"type": "object"
},
"origin":{
"type":"object",
"properties":{
"_id":{"type":"string"},
"method":{"type":"string"},
"type":{"type":"string"},
"name":{"type":"string"}
}
},
"hash":{"type":"string", "length":106},
"size":{"type":"integer"},
"file-input":{
"type": "object",
"properties": {
"name": {"$ref":"#/definitions/name"},
"type": {"$ref":"#/definitions/file-type"},
"mimetype": {"$ref":"#/definitions/mimetype"},
"instrument": {"$ref":"#/definitions/instrument"},
"measurements": {"$ref":"#/definitions/measurements"},
"tags": {"$ref":"#/definitions/tags"},
"metadata": {"$ref":"#/definitions/metadata"}
},
"additionalProperties": false
},
"file-output":{
"type": "object",
"properties": {
"name": {"$ref":"#/definitions/name"},
"type": {"$ref":"#/definitions/file-type"},
"mimetype": {"$ref":"#/definitions/mimetype"},
"instrument": {
"oneOf":[
{"$ref":"#/definitions/instrument"},
{"type":"null"}
]
},
"measurements": {"$ref":"#/definitions/measurements"},
"tags": {"$ref":"#/definitions/tags"},
"metadata": {"$ref":"#/definitions/metadata"},
"origin":{"$ref":"#/definitions/origin"},
"hash":{"$ref":"#/definitions/hash"},
"created":{"$ref":"../definitions/created-modified.json#/definitions/created"},
"modified":{"$ref":"../definitions/created-modified.json#/definitions/modified"},
"size":{"$ref":"#/definitions/size"}
},
"additionalProperties": false
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Group",
"type": "object",
"properties": {
"_id":{"$ref":"../definitions/string-id.json#"},
"name": {
"maxLength": 64,
"minLength": 1,
"pattern": "^[0-9A-Za-z][0-9A-Za-z .@_-]{0,30}[0-9A-Za-z]$",
"title": "Name",
"type": "string"
}
},
"additionalProperties": false
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"roles": {
"type": "array",
"items": {"$ref": "permission.json"},
"uniqueItems": true
},
"created": {
"type": "string"
},
"modified": {
"type": "string"
},
"_id": {
"type": "string"
}
},
"required": [
"roles",
"created",
"modified",
"_id"
]
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions":{
"name": {
"maxLength": 64,
"minLength": 1,
"pattern": "^[0-9A-Za-z][0-9A-Za-z .@_-]{0,30}[0-9A-Za-z]$",
"title": "Name",
"type": "string"
},
"group-input":{
"type": "object",
"properties": {
"_id":{"$ref":"../definitions/string-id.json#"},
"name":{"$ref":"#/definitions/name"}
},
"additionalProperties": false
},
"group-output":{
"type": "object",
"properties": {
"_id":{"$ref":"../definitions/string-id.json#"},
"name":{"$ref":"#/definitions/name"},
"roles": {
"type": "array",
"items": {"$ref": "../definitions/permission.json#"},
"uniqueItems": true
},
"created": {"$ref":"../definitions/created-modified.json#/definitions/created"},
"modified": {"$ref":"../definitions/created-modified.json#/definitions/modified"}
}
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"inputs": {
"type":"array",
"items":{
"type": "object",
"properties": {
"input":{
"type":"string"
},
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"type",
"id",
"name"
],
"additionalProperties":false
}
},
"destination": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties":false
},
"origin": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": ["string", "null"]
}
},
"required": [
"type",
"id"
],
"additionalProperties":false
},
"saved_files": {
"type": "array",
"items": {"$ref": "../mongo/file.json"}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"allOf":[
{"$ref":"created-modified.json#"}
]
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"inputs": {
"definitions": {
"_id": {"$ref":"../definitions/objectid.json#"},
"id": {"$ref":"../definitions/objectid.json#"},
"name": {"type":"string"},
"inputs-property-type":{"type":"string"},
"inputs-property-id":{"type":"string"},
"inputs-property-name":{"type":"string"},
"inputs-object": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
"type": {"$ref":"#/definitions/inputs-property-type"},
"id": {"$ref":"#/definitions/inputs-property-id"},
"name": {"$ref":"#/definitions/inputs-property-name"}
},
"required": [
"type",
......@@ -30,7 +24,18 @@
],
"additionalProperties":false
}
},
"inputs-array":{
"type":"array",
"items":{
"type":"object",
"properties":{
"type": {"$ref":"#/definitions/inputs-property-type"},
"id": {"$ref":"#/definitions/inputs-property-id"},
"name": {"$ref":"#/definitions/inputs-property-name"},
"input":{"type":"string"}
}
}
},
"destination": {
"type": "object",
......@@ -73,6 +78,41 @@
"items": {
"type": "string"
}
},
"state":{
"type":"string"
},
"attempt":{
"type":"integer"
},
"config":{
"oneOf":[
{
"enum":[null]
},
{
"type":"object"
}
]
},
"request":{
"type":"object",
"properties":{
"inputs":{
"type":"array",
"items":{
"type":"object",
"properties":{
"type":{"enum":["http", "scitran"]},
"uri":{"type":"string"},
"location":{"type":"string"},
"vu":{"type":"string"}
},
"required":["type", "uri", "location"]
}
}
}
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions":{
"project-input":{
"type": "object",
"properties": {
"public": {"$ref": "../definitions/container.json#/definitions/public"},
"label": {"$ref": "../definitions/container.json#/definitions/label"},
"metadata": {"$ref": "../definitions/container.json#/definitions/metadata"},
"group":{"$ref":"../definitions/group.json#/definitions/name"},
"archived": {"$ref":"../definitions/container.json#/definitions/archived"}
},
"additionalProperties": false
},
"project-output":{
"type": "object",
"properties": {
"_id": {"$ref":"../definitions/objectid.json#"},
"public": {"$ref": "../definitions/container.json#/definitions/public"},
"label": {"$ref": "../definitions/container.json#/definitions/label"},
"metadata": {"$ref": "../definitions/container.json#/definitions/metadata"},
"group":{"$ref":"../definitions/group.json#/definitions/name"},
"created":{"$ref":"../definitions/created-modified.json#/definitions/created"},
"modified":{"$ref":"../definitions/created-modified.json#/definitions/modified"},
"permissions":{
"type":"array",
"items":{"$ref":"../definitions/permission.json#"}
}
},
"additionalProperties": false
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions":{
"project": {"type": "string"},
"uid": {"type": "string"},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": "string"},
"session-input":{
"type": "object",
"properties": {
"public": {"$ref": "../definitions/container.json#/definitions/public"},
"label": {"$ref": "../definitions/container.json#/definitions/label"},
"metadata": {"$ref": "../definitions/container.json#/definitions/metadata"},
"archived": {"$ref":"../definitions/container.json#/definitions/archived"},
"project": {"$ref":"#/definitions/project"},
"uid": {"$ref":"#/definitions/uid"},
"timestamp": {"$ref":"#/definitions/timestamp"},
"timezone": {"$ref":"#/definitions/timezone"},
"subject": {
"allOf":[{"$ref": "../definitions/subject.json#/definitions/subject-input"}]
}
},
"additionalProperties": false
},
"session-output":{
"type": "object",
"properties": {
"_id": {"$ref":"../definitions/objectid.json#"},
"public": {"$ref": "../definitions/container.json#/definitions/public"},
"label": {"$ref": "../definitions/container.json#/definitions/label"},
"metadata": {"$ref": "../definitions/container.json#/definitions/metadata"},
"archived": {"$ref":"../definitions/container.json#/definitions/archived"},
"project": {"$ref":"#/definitions/project"},
"uid": {"$ref":"#/definitions/uid"},
"timestamp": {"$ref":"#/definitions/timestamp"},
"timezone": {"$ref":"#/definitions/timezone"},
"subject": {
"allOf":[{"$ref": "../definitions/subject.json#/definitions/subject-output"}]
},
"created":{"$ref":"../definitions/created-modified.json#/definitions/created"},
"modified":{"$ref":"../definitions/created-modified.json#/definitions/modified"},
"permissions":{
"type":"array",
"items":{"$ref":"../definitions/permission.json#"}
},
"group":{"$ref":"../definitions/group.json#/definitions/name"}
},
"additionalProperties": false
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions":{
"_id": {"type": "string"},
"firstname": { "type": "string", "maxLength": 64 },
"lastname": { "type": "string", "maxLength": 64 },
"firstname_hash": { "type": ["string", "null"] },
"lastname_hash": { "type": ["string", "null"] },
"age": { "type": ["number", "null"] },
"sex": { "enum": ["male", "female", "other", "unknown", null] },
"race": { "enum": ["American Indian or Alaska Native", "Asian", "Native Hawaiian or Other Pacific Islander", "Black or African American", "White", "More Than One Race", "Unknown or Not Reported", null] },
"ethnicity": { "enum": ["Not Hispanic or Latino", "Hispanic or Latino", "Unknown or Not Reported", null] },
"code": { "type": "string", "maxLength": 64 },
"tags": { "type": "array", "items": {"type": "string"} },
"metadata": { "type": "object" },
"subject-input":{
"type": "object",
"properties": {
"_id": {"$ref":"#/definitions/_id"},
"firstname": {"$ref":"#/definitions/firstname"},
"lastname": {"$ref":"#/definitions/lastname"},
"firstname_hash": {"$ref":"#/definitions/firstname_hash"},
"lastname_hash": {"$ref":"#/definitions/lastname_hash"},
"age": {"$ref":"#/definitions/age"},
"sex": {"$ref":"#/definitions/sex"},
"race": {"$ref":"#/definitions/race"},
"ethnicity": {"$ref":"#/definitions/ethnicity"},
"code": {"$ref":"#/definitions/code"},
"tags": {"$ref":"#/definitions/tags"},
"metadata": {"$ref":"#/definitions/metadata"}
},
"additionalProperties": false
},
"subject-output":{
"type": "object",
"properties": {
"_id": {"$ref":"#/definitions/_id"},
"firstname": {"$ref":"#/definitions/firstname"},
"lastname": {"$ref":"#/definitions/lastname"},
"firstname_hash": {"$ref":"#/definitions/firstname_hash"},
"lastname_hash": {"$ref":"#/definitions/lastname_hash"},
"age": {"$ref":"#/definitions/age"},
"sex": {"$ref":"#/definitions/sex"},
"race": {"$ref":"#/definitions/race"},
"ethnicity": {"$ref":"#/definitions/ethnicity"},
"code": {"$ref":"#/definitions/code"},
"tags": {"$ref":"#/definitions/tags"},
"metadata": {"$ref":"#/definitions/metadata"}
},
"additionalProperties": false
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"allOf":[
{"$ref":"user.json#"},
{
"type":"object",
"properties":{
"_id":{},
"firstname":{},
"lastname":{},
"email":{},
"avatar":{},
"avatars":{},
"root":{},
"disabled":{},
"preferences":{}
},
"additionalProperties":false
}
]
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"allOf":[
{"$ref":"user.json#"},
{"$ref":"created-modified.json"},
{
"type":"object",
"properties":{
"_id":{},
"firstname":{},
"lastname":{},
"email":{},
"avatars":{},
"root":{},
"disabled":{},
"preferences":{},
"created":{},
"modified":{}
},
"additionalProperties":false
}
]
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"definitions": {
"_id": {
"maxLength": 64,
"minLength": 2,
......@@ -36,7 +36,47 @@
"preferences": {
"title": "Preferences",
"type": "object"
}
},
"api_key":{
"type":"object",
"properties":{
"key": {"type": "string"},
"created": {"$ref":"../definitions/created-modified.json#/definitions/created"},
"last_used": {}
},
"additionalProperties":false
},
"user-input":{
"type":"object",
"properties":{
"_id":{"$ref":"#/definitions/_id"},
"firstname":{"$ref":"#/definitions/firstname"},
"lastname":{"$ref":"#/definitions/lastname"},
"email":{"$ref":"#/definitions/email"},
"avatar":{"$ref":"#/definitions/avatar"},
"avatars":{"$ref":"#/definitions/avatars"},
"root":{"$ref":"#/definitions/root"},
"disabled":{"$ref":"#/definitions/disabled"},
"preferences":{"$ref":"#/definitions/preferences"}
},
"additionalProperties":false
},
"type":"object"
"user-output":{
"type":"object",
"properties":{
"_id":{"$ref":"#/definitions/_id"},
"firstname":{"$ref":"#/definitions/firstname"},
"lastname":{"$ref":"#/definitions/lastname"},
"email":{"$ref":"#/definitions/email"},
"avatar":{"$ref":"#/definitions/avatar"},
"avatars":{"$ref":"#/definitions/avatars"},
"root":{"$ref":"#/definitions/root"},
"disabled":{"$ref":"#/definitions/disabled"},
"preferences":{"$ref":"#/definitions/preferences"},
"created":{"$ref":"../definitions/created-modified.json#/definitions/created"},
"modified":{"$ref":"../definitions/created-modified.json#/definitions/modified"}
},
"additionalProperties":false
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Acquisition",
"type": "object",
"allOf": [{"$ref": "../definitions/acquisition.json#/definitions/acquisition-input"}]
}
......@@ -2,20 +2,6 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Acquisition",
"type": "object",
"allOf": [{"$ref": "container.json"}],
"properties": {
"public": {},
"archived": {},
"label": {},
"metadata": {},
"session": {"type": "string"},
"uid": {"type": "string"},
"instrument": {"type": "string"},
"measurement": {"type": "string"},
"timestamp": {"type": ["string", "null"], "format": "date-time"},
"timezone": {"type": "string"}
},
"required": ["label", "session"],
"additionalProperties": false
"allOf": [{"$ref": "../definitions/acquisition.json#/definitions/acquisition-input"}],
"required": ["label", "session"]
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection",
"type": "object",
"properties": {
"public": {"$ref": "../definitions/container.json#/definitions/public"},
"label": {"$ref": "../definitions/container.json#/definitions/label"},
"metadata": {"$ref": "../definitions/container.json#/definitions/metadata"},
"curator": {"$ref": "../definitions/collection.json#/definitions/curator"},
"contents":{
"type":"object",
"properties":{
"operation":{"type":"string"},
"nodes":{
"type":"array",
"items":{
"type":"object",
"properties":{
"level":{"type":"string"},
"_id":{"$ref":"../definitions/objectid.json"}
},
"additionalProperties":false
}
}
},
"additionalProperties":false
}
},
"additionalProperties": false
}
......@@ -2,13 +2,11 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection",
"type": "object",
"allOf": [{"$ref": "container.json"}],
"properties": {
"public": {},
"label": {},
"metadata": {},
"curator": {"type": "string"}
"public": {"$ref": "../definitions/container.json#/definitions/public"},
"label": {"$ref": "../definitions/container.json#/definitions/label"},
"metadata": {"$ref": "../definitions/container.json#/definitions/metadata"},
"curator": {"$ref": "../definitions/collection.json#/definitions/curator"}
},
"required": ["label"],
"additionalProperties": false
......
......@@ -2,10 +2,10 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_id": {"type": "string"},
"public": {"type": "boolean"},
"archived": {"type": "boolean"},
"label": {"type": "string", "minLength": 1, "maxLength": 256},
"metadata": {"type": "object"}
"_id": {"$ref":"../definitions/container.json#/definitions/_id"},
"public": {"$ref":"../definitions/container.json#/definitions/public"},
"archived": {"$ref":"../definitions/container.json#/definitions/archived"},
"label": {"$ref":"../definitions/container.json#/definitions/label"},
"metadata": {"$ref":"../definitions/container.json#/definitions/metadata"}
}
}
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