From 9cd1afd0cb061a194dc8036871885cb38885e486 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Tue, 8 Nov 2016 11:44:45 -0800 Subject: [PATCH] Add "const" keyword for constant values. This addresses issue #58, which got quite a few upvotes and has a "draft 6" milestone. I used the shorter "const" that several people suggested rather than "constant", but obviously that's easy to change if the longer form is preferred. The wording was pretty much directly lifted from "enum". --- jsonschema-validation.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index d5724e03..78962516 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -547,6 +547,16 @@ +
+ + The value of this keyword MAY be of any type, including null. + + + An instance validates successfully against this keyword if its value is + equal to the value of the keyword. + +
+
The value of this keyword MUST be either a string or an array. If it is