Mercurial > hg > piper
changeset 67:ada4cd9daaba docrefactor
Pull out serialisedarray schema
author | Chris Cannam |
---|---|
date | Wed, 05 Oct 2016 09:58:49 +0100 |
parents | 98930c9d54fa |
children | 5d50f7c9afc6 |
files | examples/serialisedarray-array.json examples/serialisedarray-base64.json schema/feature.json schema/processinput.json schema/serialisedarray.json test.sh |
diffstat | 6 files changed, 26 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/serialisedarray-array.json Wed Oct 05 09:58:49 2016 +0100 @@ -0,0 +1,1 @@ +[1,2,-3,3.1415926537]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/serialisedarray-base64.json Wed Oct 05 09:58:49 2016 +0100 @@ -0,0 +1,1 @@ +"AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA"
--- a/schema/feature.json Wed Oct 05 09:42:26 2016 +0100 +++ b/schema/feature.json Wed Oct 05 09:58:49 2016 +0100 @@ -14,27 +14,10 @@ "type": "string" }, "featureValues": { - "$ref": "#/definitions/serialisedArray" + "$ref": "http://vamp-plugins.org/json/schema/serialisedarray#" } }, - "additionalProperties": false, - "definitions": { - "serialisedArray": { - "anyOf": [ - { - "type": "array", - "items": { "type": "number" } - }, - { - "type": "string", - "media": { - "binaryEncoding": "base64", - "type": "application/octet-stream" - }, - } - ] - } - } + "additionalProperties": false }
--- a/schema/processinput.json Wed Oct 05 09:42:26 2016 +0100 +++ b/schema/processinput.json Wed Oct 05 09:58:49 2016 +0100 @@ -10,28 +10,11 @@ "inputBuffers": { "type": "array", "items": { - "$ref": "#/definitions/serialisedArray" + "$ref": "http://vamp-plugins.org/json/schema/serialisedarray#" } } }, - "additionalProperties": false, - "definitions": { - "serialisedArray": { - "anyOf": [ - { - "type": "array", - "items": { "type": "number" } - }, - { - "type": "string", - "media": { - "binaryEncoding": "base64", - "type": "application/octet-stream" - } - } - ] - } - } + "additionalProperties": false }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/serialisedarray.json Wed Oct 05 09:58:49 2016 +0100 @@ -0,0 +1,20 @@ +{ + "id": "http://vamp-plugins.org/json/schema/serialisedarray#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for alternate serialisations of an array of floating-point values", + "anyOf": [ + { + "type": "array", + "items": { "type": "number" } + }, + { + "type": "string", + "media": { + "binaryEncoding": "base64", + "type": "application/octet-stream" + } + } + ] +} + +