File tree Expand file tree Collapse file tree 3 files changed +21
-111
lines changed Expand file tree Collapse file tree 3 files changed +21
-111
lines changed Original file line number Diff line number Diff line change 46
46
{
47
47
"description" : " propertyNames validation with pattern for camelCase" ,
48
48
"schema" : {
49
- "propertyNames" : { "pattern" : " ^[a-z]+([A-Z][a-z]+)* $" }
49
+ "propertyNames" : { "pattern" : " ^a+ $" }
50
50
},
51
51
"tests" : [
52
52
{
53
- "description" : " all property names valid" ,
53
+ "description" : " matching property names valid" ,
54
54
"data" : {
55
- "f" : {},
56
- "foo" : {},
57
- "foobar" : {},
58
- "fooBar" : {}
55
+ "a" : {},
56
+ "aa" : {},
57
+ "aaa" : {}
59
58
},
60
59
"valid" : true
61
60
},
62
61
{
63
- "description" : " property name with leading capital letter is invalid" ,
64
- "data" : {
65
- "Foo" : {}
66
- },
67
- "valid" : false
68
- },
69
- {
70
- "description" : " property name with adjacent capital letters is invalid" ,
62
+ "description" : " non-matching property name is invalid" ,
71
63
"data" : {
72
- "fOO" : {}
73
- },
74
- "valid" : false
75
- },
76
- {
77
- "description" : " property name with digit is invalid" ,
78
- "data" : {
79
- "foo1" : {}
64
+ "aaA" : {}
80
65
},
81
66
"valid" : false
82
67
},
83
68
{
84
69
"description" : " object without properties is valid" ,
85
70
"data" : {},
86
71
"valid" : true
87
- },
88
- {
89
- "description" : " ignores arrays" ,
90
- "data" : [1 , 2 , 3 , 4 ],
91
- "valid" : true
92
- },
93
- {
94
- "description" : " ignores strings" ,
95
- "data" : " foobar" ,
96
- "valid" : true
97
- },
98
- {
99
- "description" : " ignores other non-objects" ,
100
- "data" : 12 ,
101
- "valid" : true
102
72
}
103
73
]
104
74
},
Original file line number Diff line number Diff line change 46
46
{
47
47
"description" : " propertyNames validation with pattern for camelCase" ,
48
48
"schema" : {
49
- "propertyNames" : { "pattern" : " ^[a-z]+([A-Z][a-z]+)* $" }
49
+ "propertyNames" : { "pattern" : " ^a+ $" }
50
50
},
51
51
"tests" : [
52
52
{
53
- "description" : " all property names valid" ,
53
+ "description" : " matching property names valid" ,
54
54
"data" : {
55
- "f" : {},
56
- "foo" : {},
57
- "foobar" : {},
58
- "fooBar" : {}
55
+ "a" : {},
56
+ "aa" : {},
57
+ "aaa" : {}
59
58
},
60
59
"valid" : true
61
60
},
62
61
{
63
- "description" : " property name with leading capital letter is invalid" ,
64
- "data" : {
65
- "Foo" : {}
66
- },
67
- "valid" : false
68
- },
69
- {
70
- "description" : " property name with adjacent capital letters is invalid" ,
62
+ "description" : " non-matching property name is invalid" ,
71
63
"data" : {
72
- "fOO" : {}
73
- },
74
- "valid" : false
75
- },
76
- {
77
- "description" : " property name with digit is invalid" ,
78
- "data" : {
79
- "foo1" : {}
64
+ "aaA" : {}
80
65
},
81
66
"valid" : false
82
67
},
83
68
{
84
69
"description" : " object without properties is valid" ,
85
70
"data" : {},
86
71
"valid" : true
87
- },
88
- {
89
- "description" : " ignores arrays" ,
90
- "data" : [1 , 2 , 3 , 4 ],
91
- "valid" : true
92
- },
93
- {
94
- "description" : " ignores strings" ,
95
- "data" : " foobar" ,
96
- "valid" : true
97
- },
98
- {
99
- "description" : " ignores other non-objects" ,
100
- "data" : 12 ,
101
- "valid" : true
102
72
}
103
73
]
104
74
},
Original file line number Diff line number Diff line change 46
46
{
47
47
"description" : " propertyNames validation with pattern for camelCase" ,
48
48
"schema" : {
49
- "propertyNames" : { "pattern" : " ^[a-z]+([A-Z][a-z]+)* $" }
49
+ "propertyNames" : { "pattern" : " ^a+ $" }
50
50
},
51
51
"tests" : [
52
52
{
53
- "description" : " all property names valid" ,
53
+ "description" : " matching property names valid" ,
54
54
"data" : {
55
- "f" : {},
56
- "foo" : {},
57
- "foobar" : {},
58
- "fooBar" : {}
55
+ "a" : {},
56
+ "aa" : {},
57
+ "aaa" : {}
59
58
},
60
59
"valid" : true
61
60
},
62
61
{
63
- "description" : " property name with leading capital letter is invalid" ,
64
- "data" : {
65
- "Foo" : {}
66
- },
67
- "valid" : false
68
- },
69
- {
70
- "description" : " property name with adjacent capital letters is invalid" ,
62
+ "description" : " non-matching property name is invalid" ,
71
63
"data" : {
72
- "fOO" : {}
73
- },
74
- "valid" : false
75
- },
76
- {
77
- "description" : " property name with digit is invalid" ,
78
- "data" : {
79
- "foo1" : {}
64
+ "aaA" : {}
80
65
},
81
66
"valid" : false
82
67
},
83
68
{
84
69
"description" : " object without properties is valid" ,
85
70
"data" : {},
86
71
"valid" : true
87
- },
88
- {
89
- "description" : " ignores arrays" ,
90
- "data" : [1 , 2 , 3 , 4 ],
91
- "valid" : true
92
- },
93
- {
94
- "description" : " ignores strings" ,
95
- "data" : " foobar" ,
96
- "valid" : true
97
- },
98
- {
99
- "description" : " ignores other non-objects" ,
100
- "data" : 12 ,
101
- "valid" : true
102
72
}
103
73
]
104
74
},
You can’t perform that action at this time.
0 commit comments