Mercurial > hg > piper
changeset 146:b521ca16c51d
Use anyOf to supply the content object type
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 27 Sep 2016 11:19:19 +0100 |
parents | 78c5a6d3a1b6 |
children | 30bd89a8cbeb |
files | schema/request.json schema/response.json |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/request.json Fri Sep 23 14:19:32 2016 +0100 +++ b/schema/request.json Tue Sep 27 11:19:19 2016 +0100 @@ -8,7 +8,12 @@ "type": "string" }, "content": { - "type": "object" + "anyOf": [ + { "$ref": "http://vamp-plugins.org/json/schema/loadrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/configurationrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/processrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/finishrequest#" } + ] } }, "required": [ "type" ],
--- a/schema/response.json Fri Sep 23 14:19:32 2016 +0100 +++ b/schema/response.json Tue Sep 27 11:19:19 2016 +0100 @@ -14,7 +14,13 @@ "type": "string" }, "content": { - "type": "object" + "anyOf": [ + { "$ref": "http://vamp-plugins.org/json/schema/listresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/loadresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/configurationresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/processresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/finishresponse#" } + ] } }, "required": [ "type", "success" ],