@@ -110,17 +110,17 @@ describe('schema validators', function () {
110
110
111
111
expect ( validator ( 'foo' ) . errors ) . to . eql ( [
112
112
{
113
- message : 'should be number' ,
113
+ message : 'must be number' ,
114
114
location : {
115
115
in : 'query' ,
116
116
name : 'foo' ,
117
117
docPath : '/components/schemas/number' ,
118
118
path : '' ,
119
119
} ,
120
120
ajvError : {
121
- dataPath : '/value' ,
121
+ instancePath : '/value' ,
122
122
keyword : 'type' ,
123
- message : 'should be number' ,
123
+ message : 'must be number' ,
124
124
params : {
125
125
type : 'number' ,
126
126
} ,
@@ -144,17 +144,17 @@ describe('schema validators', function () {
144
144
145
145
expect ( validator ( { } ) . errors , 'should still require "b"' ) . to . eql ( [
146
146
{
147
- message : "should have required property 'b'" ,
147
+ message : "must have required property 'b'" ,
148
148
location : {
149
149
in : 'request' ,
150
150
name : 'body' ,
151
151
docPath : '/components/schemas/object' ,
152
152
path : '' ,
153
153
} ,
154
154
ajvError : {
155
- dataPath : '/value' ,
155
+ instancePath : '/value' ,
156
156
keyword : 'required' ,
157
- message : "should have required property 'b'" ,
157
+ message : "must have required property 'b'" ,
158
158
params : {
159
159
missingProperty : 'b' ,
160
160
} ,
@@ -177,17 +177,17 @@ describe('schema validators', function () {
177
177
178
178
expect ( validator ( { } ) . errors , 'should still require "a"' ) . to . eql ( [
179
179
{
180
- message : "should have required property 'a'" ,
180
+ message : "must have required property 'a'" ,
181
181
location : {
182
182
in : 'request' ,
183
183
name : 'body' ,
184
184
docPath : '/components/schemas/object' ,
185
185
path : '' ,
186
186
} ,
187
187
ajvError : {
188
- dataPath : '/value' ,
188
+ instancePath : '/value' ,
189
189
keyword : 'required' ,
190
- message : "should have required property 'a'" ,
190
+ message : "must have required property 'a'" ,
191
191
params : {
192
192
missingProperty : 'a' ,
193
193
} ,
@@ -223,17 +223,17 @@ describe('schema validators', function () {
223
223
224
224
expect ( validator ( { a : 'hello' } ) . errors ) . to . eql ( [
225
225
{
226
- message : 'should be number' ,
226
+ message : 'must be number' ,
227
227
location : {
228
228
in : 'request' ,
229
229
name : 'body' ,
230
230
docPath : '/components/schemas/object2' ,
231
231
path : '/a' ,
232
232
} ,
233
233
ajvError : {
234
- dataPath : '/value/a' ,
234
+ instancePath : '/value/a' ,
235
235
keyword : 'type' ,
236
- message : 'should be number' ,
236
+ message : 'must be number' ,
237
237
params : {
238
238
type : 'number' ,
239
239
} ,
@@ -266,17 +266,17 @@ describe('schema validators', function () {
266
266
// sure it correctly catches decimal values.
267
267
expect ( validator ( 7.5 ) . errors ) . to . eql ( [
268
268
{
269
- message : 'should be integer' ,
269
+ message : 'must be integer' ,
270
270
location : {
271
271
in : 'query' ,
272
272
name : 'foo' ,
273
273
docPath : '/components/schemas/int32' ,
274
274
path : '' ,
275
275
} ,
276
276
ajvError : {
277
- dataPath : '/value' ,
277
+ instancePath : '/value' ,
278
278
keyword : 'type' ,
279
- message : 'should be integer' ,
279
+ message : 'must be integer' ,
280
280
params : {
281
281
type : 'integer' ,
282
282
} ,
@@ -288,17 +288,17 @@ describe('schema validators', function () {
288
288
// The expected failure result for an int32 format failure.
289
289
const int32FailValue = [
290
290
{
291
- message : 'should match format "int32"' ,
291
+ message : 'must match format "int32"' ,
292
292
location : {
293
293
in : 'query' ,
294
294
name : 'foo' ,
295
295
docPath : '/components/schemas/int32' ,
296
296
path : '' ,
297
297
} ,
298
298
ajvError : {
299
- dataPath : '/value' ,
299
+ instancePath : '/value' ,
300
300
keyword : 'format' ,
301
- message : 'should match format "int32"' ,
301
+ message : 'must match format "int32"' ,
302
302
params : {
303
303
format : 'int32' ,
304
304
} ,
@@ -479,9 +479,9 @@ describe('schema validators', function () {
479
479
errors : [
480
480
{
481
481
ajvError : {
482
- dataPath : '/value' ,
482
+ instancePath : '/value' ,
483
483
keyword : 'required' ,
484
- message : "should have required property 'a'" ,
484
+ message : "must have required property 'a'" ,
485
485
params : {
486
486
missingProperty : 'a' ,
487
487
} ,
@@ -493,7 +493,7 @@ describe('schema validators', function () {
493
493
name : 'body' ,
494
494
path : '' ,
495
495
} ,
496
- message : "should have required property 'a'" ,
496
+ message : "must have required property 'a'" ,
497
497
} ,
498
498
] ,
499
499
value : { } ,
@@ -517,9 +517,9 @@ describe('schema validators', function () {
517
517
errors : [
518
518
{
519
519
ajvError : {
520
- dataPath : '/value' ,
520
+ instancePath : '/value' ,
521
521
keyword : 'required' ,
522
- message : "should have required property 'a'" ,
522
+ message : "must have required property 'a'" ,
523
523
params : {
524
524
missingProperty : 'a' ,
525
525
} ,
@@ -531,13 +531,13 @@ describe('schema validators', function () {
531
531
name : 'body' ,
532
532
path : '' ,
533
533
} ,
534
- message : "should have required property 'a'" ,
534
+ message : "must have required property 'a'" ,
535
535
} ,
536
536
{
537
537
ajvError : {
538
- dataPath : '/value' ,
538
+ instancePath : '/value' ,
539
539
keyword : 'required' ,
540
- message : "should have required property 'b'" ,
540
+ message : "must have required property 'b'" ,
541
541
params : {
542
542
missingProperty : 'b' ,
543
543
} ,
@@ -549,7 +549,7 @@ describe('schema validators', function () {
549
549
name : 'body' ,
550
550
path : '' ,
551
551
} ,
552
- message : "should have required property 'b'" ,
552
+ message : "must have required property 'b'" ,
553
553
} ,
554
554
] ,
555
555
value : { } ,
@@ -594,9 +594,9 @@ describe('schema validators', function () {
594
594
errors : [
595
595
{
596
596
ajvError : {
597
- dataPath : '/value' ,
597
+ instancePath : '/value' ,
598
598
keyword : 'type' ,
599
- message : 'should be number' ,
599
+ message : 'must be number' ,
600
600
params : {
601
601
type : 'number' ,
602
602
} ,
@@ -608,7 +608,7 @@ describe('schema validators', function () {
608
608
name : 'body' ,
609
609
path : '' ,
610
610
} ,
611
- message : 'should be number' ,
611
+ message : 'must be number' ,
612
612
} ,
613
613
] ,
614
614
value : '9' ,
@@ -685,7 +685,7 @@ describe('schema validators', function () {
685
685
kind : 'test' ,
686
686
} ) . errors ?. [ 0 ] . message ,
687
687
'should be invalid with 0 items'
688
- ) . to . equal ( 'should NOT have fewer than 1 items' ) ;
688
+ ) . to . equal ( 'must NOT have fewer than 1 items' ) ;
689
689
690
690
expect (
691
691
validator ( {
0 commit comments