From b2db6316a3a222d8a63ff94c162d1f9f142615bd Mon Sep 17 00:00:00 2001 From: mjkoster Date: Thu, 16 Jan 2020 20:09:06 -0800 Subject: [PATCH 1/2] type changes enum items can be any type (issue #100) add float subtype (issue #92) --- sdf-schema.json | 10 ++-------- sdf.md | 10 +++++----- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/sdf-schema.json b/sdf-schema.json index f610bb5..457081f 100644 --- a/sdf-schema.json +++ b/sdf-schema.json @@ -290,7 +290,7 @@ }, "subtype":{ "type": "string", - "enum": ["bytestring", "unixtime"] + "enum": ["bytestring", "unixtime", "float"] }, "contentFormat": { "type": "string" @@ -322,13 +322,7 @@ }, "enum": { "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minitems": 1 - } + "minItems": 1 }, "const": { "oneOf": [ diff --git a/sdf.md b/sdf.md index 1347210..ffe95d8 100644 --- a/sdf.md +++ b/sdf.md @@ -46,8 +46,8 @@ Declaration "value": { "type": "string", "enum": [ - { "on":1 }, - { "off":0 } + "on", + "off" ] } }, @@ -376,7 +376,7 @@ odmData is used for Action parameters, for Event data, and for reusable constrai |minimum|number|no|lower limit of value in the representation format| |maximum|number|no|upper limit of value in the representation format| |multipleOf|number|no|indicates the resolution of the number in representation format| -|enum|array of map containing {string:number}|no|enumeration constraint| +|enum|array of any type|no|enumeration constraint| |pattern|string|no|regular expression to constrain a string pattern| |format|string|no|JSON Schema formats| N/A| |minLength|integer|no|shortest length string in octets| @@ -408,8 +408,8 @@ odmData may define or contain the following ODM types: "value": { "type": "string", "enum": [ - { "on":1 }, - { "off":0 } + "on", + "off" ] } }, From 551ae112f2e637031643abbe1bfc9dde94130537 Mon Sep 17 00:00:00 2001 From: mjkoster Date: Tue, 21 Jan 2020 18:28:01 -0800 Subject: [PATCH 2/2] Update sdf-schema.json remove the float subtype pending use case need --- sdf-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdf-schema.json b/sdf-schema.json index 457081f..d0625dc 100644 --- a/sdf-schema.json +++ b/sdf-schema.json @@ -290,7 +290,7 @@ }, "subtype":{ "type": "string", - "enum": ["bytestring", "unixtime", "float"] + "enum": ["bytestring", "unixtime"] }, "contentFormat": { "type": "string"