view json/schema/rpcresponse.json @ 216:72a3b8faba89 tip master

programParameters should not have a pattern enforced on its keys - a program name can be anything
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 08 Apr 2020 14:57:24 +0100
parents ffe01c8286c4
children
line wrap: on
line source
{
    "id": "http://vamp-plugins.org/piper/json/schema/rpcresponse#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "schema for a serialised response to an RPC request; compatible with JSON-RPC, except that the method name must be included here as well as in the request",
    "type": "object",
    "oneOf": [ {
        "properties": {
	    "method": {
	        "type": "string"
	    },
	    "result": {
                "anyOf": [
                    { "$ref": "http://vamp-plugins.org/piper/json/schema/listresponse#" },
                    { "$ref": "http://vamp-plugins.org/piper/json/schema/loadresponse#" },
                    { "$ref": "http://vamp-plugins.org/piper/json/schema/configurationresponse#" },
                    { "$ref": "http://vamp-plugins.org/piper/json/schema/processresponse#" },
                    { "$ref": "http://vamp-plugins.org/piper/json/schema/finishresponse#" }
                ]                
	    },
            "id": {
                "anyOf": [
                    { "type": "string" },
                    { "type": "number" }
                ]
            },
            "jsonrpc": {
                "type": "string"
            }
        },
        "required": [ "method", "result" ],
        "additionalProperties": false
    }, {
        "properties": {
	    "method": {
	        "type": "string"
	    },
	    "error": {
                "$ref": "http://vamp-plugins.org/piper/json/schema/error#"
	    },
            "id": {
                "anyOf": [
                    { "type": "string" },
                    { "type": "number" }
                ]
            },
            "jsonrpc": {
                "type": "string"
            }
        },
        "required": [ "method", "error" ],
        "additionalProperties": false
    } ]
}