From ce36253931ebcf5c26ce253e11436b3be6e8563d Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Thu, 27 Oct 2016 16:04:07 +0200 Subject: [PATCH 1/3] Add max and min for fields. --- siren.schema.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/siren.schema.json b/siren.schema.json index 509a82b..d099f18 100644 --- a/siren.schema.json +++ b/siren.schema.json @@ -157,6 +157,14 @@ "name" ], "properties": { + "max": { + "description": "A string or number describing the maximum value among the allowed ranges of values for this field.", + "type": [ "string", "number" ] + }, + "min": { + "description": "A string or number describing the minimum value among the allowed ranges of values for this field.", + "type": [ "string", "number" ] + }, "name": { "description": "A name describing the control. Field names MUST be unique within the set of fields for an action. The behaviour of clients when parsing a Siren document that violates this constraint is undefined.", "type": "string" From 8029b2bf224cbc89a75f934cd48bc99000ff9a6f Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Wed, 23 Nov 2016 12:43:19 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Clarify=20documentation=20for=20=E2=80=9Cma?= =?UTF-8?q?x=E2=80=9D=20and=20=E2=80=9Cmin=E2=80=9D=20properties.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- siren.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/siren.schema.json b/siren.schema.json index d099f18..4af6658 100644 --- a/siren.schema.json +++ b/siren.schema.json @@ -158,11 +158,11 @@ ], "properties": { "max": { - "description": "A string or number describing the maximum value among the allowed ranges of values for this field.", + "description": "A string or number describing the maximum value among the allowed ranges of values for this field. This property can only apply to a field with a linear or periodic domain.", "type": [ "string", "number" ] }, "min": { - "description": "A string or number describing the minimum value among the allowed ranges of values for this field.", + "description": "A string or number describing the minimum value among the allowed ranges of values for this field. This property can only apply to a field with a linear or periodic domain.", "type": [ "string", "number" ] }, "name": { From 1eba0fe629f769d896c03ec15d67d12f86867701 Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Wed, 23 Nov 2016 12:46:34 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Add=20documentation=20for=20=E2=80=9Cmax?= =?UTF-8?q?=E2=80=9D=20and=20=E2=80=9Cmin=E2=80=9D=20properties.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index aa9c001..4b42879 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,14 @@ A collection of fields, expressed as an array of objects in JSON Siren such as ` Fields represent controls inside of actions. They may contain these attributes: +####max + +A string or number describing the maximum value among the allowed range of values. This property can only apply to a field with a linear or periodic domain. Optional. + +####min + +A string or number describing the minimum value arong the allowed range of values. This property can only apply to a field with a linear or periodic domain. Optional. + ####name A name describing the control. Field names MUST be unique within the set of fields for an action. The behaviour of clients when parsing a Siren document that violates this constraint is undefined. Required.