Skip to content

Commit 87aea9a

Browse files
add const-value test
1 parent a0bdd7a commit 87aea9a

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"id": "http://json-schema.org/geo",
3+
"$schema": "http://json-schema.org/draft-06/schema#",
4+
"description": "Testing JSON Schema const values",
5+
"type": "object",
6+
"properties": {
7+
"0testConstString": {
8+
"const": "str"
9+
},
10+
"1testConstInteger": {
11+
"const": 1
12+
},
13+
"2testConstFloat": {
14+
"const": 2.3
15+
},
16+
"3testConstBoolean": {
17+
"const": false
18+
},
19+
"4testConstNull": {
20+
"const": null
21+
},
22+
"5testEnumString": {
23+
"enum": ["a", "b", "c"]
24+
},
25+
"6testEnumInteger": {
26+
"enum": [4, 5, 6]
27+
},
28+
"7testEnumMixed": {
29+
"enum": [true, 7.8, "foo"]
30+
},
31+
"8testNumber": {
32+
"type": "number"
33+
},
34+
"9testString": {
35+
"type": "string"
36+
},
37+
"10testBoolean": {
38+
"type": "boolean"
39+
}
40+
},
41+
"additionalProperties": false
42+
}

0 commit comments

Comments
 (0)