# HG changeset patch # User Chris Cannam # Date 1475657958 -3600 # Node ID 5d50f7c9afc61d22b3135e0053c1c154cdaec146 # Parent 8f3ba64ec888888ee7c932f47011added8354073# Parent ada4cd9daaba46bc2046bab5d891c3e3fd1f1f49 Merge from branch docrefactor diff -r ada4cd9daaba -r 5d50f7c9afc6 schema/request.json --- a/schema/request.json Wed Oct 05 09:58:49 2016 +0100 +++ b/schema/request.json Wed Oct 05 09:59:18 2016 +0100 @@ -1,22 +1,31 @@ { "id": "http://vamp-plugins.org/json/schema/request#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a simple serialised request", + "description": "schema for a serialised request compatible with JSON-RPC", "type": "object", "properties": { - "type": { + "method": { "type": "string" }, - "content": { + "params": { "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#" } ] - } + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } }, - "required": [ "type" ], + "required": [ "method" ], "additionalProperties": false } diff -r ada4cd9daaba -r 5d50f7c9afc6 schema/response.json --- a/schema/response.json Wed Oct 05 09:58:49 2016 +0100 +++ b/schema/response.json Wed Oct 05 09:59:18 2016 +0100 @@ -3,27 +3,50 @@ "$schema": "http://json-schema.org/draft-04/schema#", "description": "schema for a success or failure response to a request", "type": "object", - "properties": { - "type": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "errorText": { - "type": "string" - }, - "content": { - "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" ], - "additionalProperties": false + "oneOf": [ + { + "properties": { + "result": { + "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#" } + ] + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "result" ], + "additionalProperties": false + }, + { + "properties": { + "error": { + { "$ref": "http://vamp-plugins.org/json/schema/error#" } + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "error" ], + "additionalProperties": false + } + ] } - + +