File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,10 +67,14 @@ This suite is being used by:
6767 * [ jsonschema (javascript)] ( https://github.com/tdegrunt/jsonschema )
6868 * [ JaySchema (javascript)] ( https://github.com/natesilva/jayschema )
6969 * [ z-schema (javascript)] ( https://github.com/zaggino/z-schema )
70+ * [ jassi (javascript)] ( https://github.com/iclanzan/jassi )
71+ * [ json-schema-valid (javascript)] ( https://github.com/ericgj/json-schema-valid )
7072 * [ jesse (Erlang)] ( https://github.com/klarna/jesse )
7173 * [ json-schema (PHP)] ( https://github.com/justinrainbow/json-schema )
7274 * [ gojsonschema (Go)] ( https://github.com/sigu-399/gojsonschema )
7375 * [ json_schema (Dart)] ( https://github.com/patefacio/json_schema )
76+ * [ tv4 (JavaScript)] ( https://github.com/geraintluff/tv4 )
77+ * [ Jsonary (JavaScript)] ( https://github.com/jsonary-js/jsonary )
7478
7579If you use it as well, please fork and send a pull request adding yourself to
7680the list :).
Original file line number Diff line number Diff line change 3535 "valid" : false
3636 }
3737 ]
38+ },
39+ {
40+ "description" : " enums in properties" ,
41+ "schema" : {
42+ "type" :" object" ,
43+ "properties" : {
44+ "foo" : {"enum" :[" foo" ]},
45+ "bar" : {"enum" :[" bar" ], "required" :true }
46+ }
47+ },
48+ "tests" : [
49+ {
50+ "description" : " both properties are valid" ,
51+ "data" : {"foo" :" foo" , "bar" :" bar" },
52+ "valid" : true
53+ },
54+ {
55+ "description" : " missing optional property is valid" ,
56+ "data" : {"bar" :" bar" },
57+ "valid" : true
58+ },
59+ {
60+ "description" : " missing required property is invalid" ,
61+ "data" : {"foo" :" foo" },
62+ "valid" : false
63+ },
64+ {
65+ "description" : " missing all properties is invalid" ,
66+ "data" : {},
67+ "valid" : false
68+ }
69+ ]
3870 }
3971]
Original file line number Diff line number Diff line change 3535 "valid" : false
3636 }
3737 ]
38+ },
39+ {
40+ "description" : " enums in properties" ,
41+ "schema" : {
42+ "type" :" object" ,
43+ "properties" : {
44+ "foo" : {"enum" :[" foo" ]},
45+ "bar" : {"enum" :[" bar" ]}
46+ },
47+ "required" : [" bar" ]
48+ },
49+ "tests" : [
50+ {
51+ "description" : " both properties are valid" ,
52+ "data" : {"foo" :" foo" , "bar" :" bar" },
53+ "valid" : true
54+ },
55+ {
56+ "description" : " missing optional property is valid" ,
57+ "data" : {"bar" :" bar" },
58+ "valid" : true
59+ },
60+ {
61+ "description" : " missing required property is invalid" ,
62+ "data" : {"foo" :" foo" },
63+ "valid" : false
64+ },
65+ {
66+ "description" : " missing all properties is invalid" ,
67+ "data" : {},
68+ "valid" : false
69+ }
70+ ]
3871 }
3972]
Original file line number Diff line number Diff line change 6969 "valid" : false
7070 }
7171 ]
72+ },
73+ {
74+ "description" : " forbidden property" ,
75+ "schema" : {
76+ "properties" : {
77+ "foo" : {
78+ "not" : {}
79+ }
80+ }
81+ },
82+ "tests" : [
83+ {
84+ "description" : " property present" ,
85+ "data" : {"foo" : 1 , "bar" : 2 },
86+ "valid" : false
87+ },
88+ {
89+ "description" : " property absent" ,
90+ "data" : {"bar" : 1 , "baz" : 2 },
91+ "valid" : true
92+ }
93+ ]
7294 }
95+
7396]
Original file line number Diff line number Diff line change 7575 "description" : " an IP address with out-of-range values" ,
7676 "data" : " 256.256.256.256" ,
7777 "valid" : false
78+ },
79+ {
80+ "description" : " an IP address without 4 components" ,
81+ "data" : " 127.0" ,
82+ "valid" : false
83+ },
84+ {
85+ "description" : " an IP address as an integer" ,
86+ "data" : " 0x7f000001" ,
87+ "valid" : false
7888 }
7989 ]
8090 },
You can’t perform that action at this time.
0 commit comments