metamaps--metamaps/doc/api/schemas/_topic.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

63 lines
1 KiB
JSON

{
"name": "Topic",
"type": "object",
"properties": {
"id": {
"$ref": "_id.json"
},
"name": {
"type": "string"
},
"desc": {
"type": "string"
},
"link": {
"format": "uri",
"type": "string"
},
"permission": {
"$ref": "_permission.json"
},
"created_at": {
"$ref": "_datetimestamp.json"
},
"updated_at": {
"$ref": "_datetimestamp.json"
},
"user_id": {
"$ref": "_id.json"
},
"user": {
"$ref": "_user.json"
},
"metacode_id": {
"$ref": "_id.json"
},
"metacode": {
"$ref": "_metacode.json"
}
},
"required": [
"id",
"name",
"desc",
"link",
"permission",
"created_at",
"updated_at"
],
"allOf": [
{
"oneOf": [
{ "required": [ "user_id" ] },
{ "required": [ "user" ] }
]
},
{
"oneOf": [
{ "required": [ "metacode_id" ] },
{ "required": [ "metacode" ] }
]
}
]
}