5e0e44b436
* fix map schema - woot it works * update other schemas to include embeddable attrs * update current user schema/examples
71 lines
1.2 KiB
JSON
71 lines
1.2 KiB
JSON
{
|
|
"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" ] }
|
|
]
|
|
}
|
|
]
|
|
}
|