metamaps--metamaps/doc/api/schemas/_map.json
Devin Howard 5e0e44b436 supercharge the schemas (#874)
* fix map schema - woot it works

* update other schemas to include embeddable attrs

* update current user schema/examples
2016-10-29 22:58:31 +08:00

145 lines
2.5 KiB
JSON

{
"name": "Map",
"type": "object",
"properties": {
"id": {
"$ref": "_id.json"
},
"name": {
"type": "string"
},
"desc": {
"type": "string"
},
"permission": {
"$ref": "_permission.json"
},
"screenshot": {
"format": "uri",
"type": "string"
},
"starred": {
"type": "boolean"
},
"created_at": {
"$ref": "_datetimestamp.json"
},
"updated_at": {
"$ref": "_datetimestamp.json"
},
"user_id": {
"$ref": "_id.json"
},
"user": {
"$ref": "_user.json"
},
"topic_ids": {
"type": "array",
"items": {
"$ref": "_id.json"
}
},
"topics": {
"type": "array",
"items": {
"$ref": "_topic.json"
}
},
"synapse_ids": {
"type": "array",
"items": {
"$ref": "_id.json"
}
},
"synapses": {
"type": "array",
"items": {
"$ref": "_synapse.json"
}
},
"mapping_ids": {
"type": "array",
"items": {
"$ref": "_id.json"
}
},
"mappings": {
"type": "array",
"items": {
"$ref": "_mapping.json"
}
},
"contributor_ids": {
"type": "array",
"items": {
"$ref": "_id.json"
}
},
"contributors": {
"type": "array",
"items": {
"$ref": "_user.json"
}
},
"collaborator_ids": {
"type": "array",
"items": {
"$ref": "_id.json"
}
},
"collaborators": {
"type": "array",
"items": {
"$ref": "_user.json"
}
}
},
"required": [
"id",
"name",
"desc",
"permission",
"screenshot",
"starred",
"created_at",
"updated_at"
],
"allOf": [
{
"oneOf": [
{ "required": [ "user_id" ] },
{ "required": [ "user" ] }
]
},
{
"oneOf": [
{ "required": [ "topic_ids" ] },
{ "required": [ "topics" ] }
]
},
{
"oneOf": [
{ "required": [ "synapse_ids" ] },
{ "required": [ "synapses" ] }
]
},
{
"oneOf": [
{ "required": [ "mapping_ids" ] },
{ "required": [ "mappings" ] }
]
},
{
"oneOf": [
{ "required": [ "contributor_ids" ] },
{ "required": [ "contributors" ] }
]
},
{
"oneOf": [
{ "required": [ "collaborator_ids" ] },
{ "required": [ "collaborators" ] }
]
}
]
}