Skip to content

Commit d7f98b5

Browse files
authored
Merge pull request #139 from handrews/const
Add "const" keyword for constant values.
2 parents d751685 + fca988b commit d7f98b5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

jsonschema-validation.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,16 @@
546546
</t>
547547
</section>
548548

549+
<section title="const">
550+
<t>
551+
The value of this keyword MAY be of any type, including null.
552+
</t>
553+
<t>
554+
An instance validates successfully against this keyword if its value is
555+
equal to the value of the keyword.
556+
</t>
557+
</section>
558+
549559
<section title="type">
550560
<t>
551561
The value of this keyword MUST be either a string or an array. If it is

schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
]
125125
}
126126
},
127+
"const": {},
127128
"enum": {
128129
"type": "array",
129130
"minItems": 1,

0 commit comments

Comments
 (0)