From 35d2577580d544fa518628c3a3dac0db02f73406 Mon Sep 17 00:00:00 2001 From: Daniel Perrett Date: Wed, 8 Jul 2015 13:22:24 +0100 Subject: [PATCH] Tighten up wording of 'Default values for missing keywords' I believe the intention of the previous wording here was that implementations could represent default values by changing the in-memory representation of the schema so that the default values are present, rather than by changing the code which acts on the in-memory representation to follow the default behaviour each time. However, the wording was also open to other interpretations, e.g. that implementations could ignore default values entirely (and might therefore cause errors or behave in the opposite manner if the default value is boolean true). Since there is nothing in this schema which would be affected by such changes to the in-memory representation, it can be assumed that this representation is entirely within the domain of the implementation and there is no need to explicitly permit inference of defaults; the only real requirement is that the result be the same. --- jsonschema-schema.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jsonschema-schema.xml b/jsonschema-schema.xml index aebacfed..9da21733 100644 --- a/jsonschema-schema.xml +++ b/jsonschema-schema.xml @@ -212,8 +212,9 @@
- Some keywords, if absent, MAY be regarded by implementations as having - a default value. In this case, the default value will be mentioned. + Where keywords are specified which MAY be absent but which have a default value + described, implementations MUST produce the same results whether the keyword is + absent or whether it is present and has the default value.