Update JSON schemas for github-pages

This commit is contained in:
Benjamin Neff 2018-10-05 22:18:10 +02:00
parent c30bfc4e49
commit 864829aeb8
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -10,6 +10,7 @@
{"$ref": "#/definitions/reshare"}, {"$ref": "#/definitions/reshare"},
{"$ref": "#/definitions/profile"}, {"$ref": "#/definitions/profile"},
{"$ref": "#/definitions/location"}, {"$ref": "#/definitions/location"},
{"$ref": "#/definitions/embed"},
{"$ref": "#/definitions/photo"}, {"$ref": "#/definitions/photo"},
{"$ref": "#/definitions/poll"}, {"$ref": "#/definitions/poll"},
{"$ref": "#/definitions/poll_answer"} {"$ref": "#/definitions/poll_answer"}
@ -101,7 +102,7 @@
"positive": { "type": "boolean" }, "positive": { "type": "boolean" },
"parent_type": { "enum": ["Post", "Comment"] } "parent_type": { "enum": ["Post", "Comment"] }
}, },
"required": ["positive"] "required": ["positive", "parent_type"]
} }
} }
} }
@ -164,11 +165,11 @@
"required": [ "required": [
"guid", "public", "created_at" "guid", "public", "created_at"
] ]
}
}, },
"required": [ "required": [
"entity_type", "entity_data" "entity_type", "entity_data"
] ]
}
}, },
"status_message": { "status_message": {
@ -231,10 +232,10 @@
"root_author": {"type": "string"}, "root_author": {"type": "string"},
"root_guid": {"$ref": "#/definitions/guid"} "root_guid": {"$ref": "#/definitions/guid"}
}, },
"required": ["author", "guid", "created_at", "root_author", "root_guid"] "required": ["author", "guid", "created_at"]
}
}, },
"required": ["entity_type", "entity_data"] "required": ["entity_type", "entity_data"]
}
}, },
"profile": { "profile": {
@ -247,6 +248,7 @@
"entity_data": { "entity_data": {
"type": "object", "type": "object",
"properties": { "properties": {
"full_name": { "type": ["string", "null"] },
"first_name": { "type": ["string", "null"] }, "first_name": { "type": ["string", "null"] },
"last_name": { "type": ["string", "null"] }, "last_name": { "type": ["string", "null"] },
"gender": { "type": ["string", "null"] }, "gender": { "type": ["string", "null"] },
@ -372,6 +374,26 @@
] ]
} }
} }
},
"embed": {
"type": "object",
"properties": {
"entity_type": {
"type": "string",
"pattern": "^embed$"
},
"entity_data": {
"type": "object",
"properties": {
"url": { "type": ["string", "null"] },
"title": { "type": ["string", "null"] },
"description": { "type": ["string", "null"] },
"image": { "type": ["string", "null"] },
"nothing": { "type": "boolean" }
}
}
}
} }
} }
} }