metamaps--metamaps/doc/api/schemas/_synapse.json

72 lines
1.2 KiB
JSON
Raw Permalink Normal View History

{
"name": "Synapse",
"type": "object",
"properties": {
"id": {
"$ref": "_id.json"
},
"desc": {
"type": "string"
},
"category": {
"type": "string",
"pattern": "(from-to|both)"
},
"permission": {
"$ref": "_permission.json"
},
"created_at": {
"$ref": "_datetimestamp.json"
},
"updated_at": {
"$ref": "_datetimestamp.json"
},
"topic1_id": {
"$ref": "_id.json"
},
"topic1": {
"$ref": "_topic.json"
},
"topic2_id": {
"$ref": "_id.json"
},
"topic2": {
"$ref": "_topic.json"
},
"user_id": {
"$ref": "_id.json"
},
"user": {
"$ref": "_user.json"
}
},
"required": [
"id",
"desc",
"category",
"permission",
"created_at",
"updated_at"
],
"allOf": [
{
"oneOf": [
{ "required": [ "topic1_id" ] },
{ "required": [ "topic1" ] }
]
},
{
"oneOf": [
{ "required": [ "topic2_id" ] },
{ "required": [ "topic2" ] }
]
},
{
"oneOf": [
{ "required": [ "user_id" ] },
{ "required": [ "user" ] }
]
}
]
}