Skip to content

Commit b575711

Browse files
committed
Fix an bad test and improve error messaging
1 parent b694e5e commit b575711

2 files changed

Lines changed: 27 additions & 27 deletions

File tree

src/test-suite/tests/allOf.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
{
2727
"description": "allOf pass",
2828
"schema": {
29-
"oneOf": [
30-
{ "type": "string" },
29+
"allOf": [
30+
{ "type": "number" },
3131
{ "minimum": 3 }
3232
]
3333
},
34-
"instance": 42,
34+
"instance": 5,
3535
"errors": []
3636
}
3737
]

src/translations/en-US.ftl

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
// Any type keywords
22
boolean-schema-message = A value is not allowed here
33
type-message = Expected a {$expectedTypes}
4-
const-message = Expected {$expected}
5-
enum-message = Expected {$expected}
4+
const-message = Expected exactly {$expected}
5+
enum-message = Expected one of {$expected}
66
format-message = Expected a value matching the '{$format}' format
7-
unknown-message = Failed the '{$keyword}' keyword
7+
unknown-message = Validation failed for '{$keyword}'
88
99
// Number keywords
1010
exclusiveMaximum-message = Expected a number less than {$exclusiveMaximum}
1111
exclusiveMinimum-message = Expected a number greater than {$exclusiveMinimum}
12-
maximum-message = Expected a number less than {$maximum}
13-
minimum-message = Expected a number greater than {$minimum}
12+
maximum-message = Expected a number less than or equal to {$maximum}
13+
minimum-message = Expected a number greater than or equal to {$minimum}
1414
multipleOf-message = Expected a number that is a multiple of {$multipleOf}
1515
1616
// String keywords
17-
maxLength-message = Expected a string with at most {$maxLength} characters
17+
maxLength-message = Expected a string with no more than {$maxLength} characters
1818
minLength-message = Expected a string with at least {$minLength} characters
1919
pattern-message = Expected a string matching the regular expression /{$pattern}/
2020
2121
// Array keywords
22-
maxItems-message = Expected an array with at most {$maxItems} items
22+
maxItems-message = Expected an array with no more than {$maxItems} items
2323
minItems-message = Expected an array with at least {$minItems} items
2424
contains-message = Expected an array that contains {$minContains ->
25-
[1] at least one item that passes
26-
*[other] at least {$minContains} items that pass
25+
[1] at least one item matching
26+
*[other] at least {$minContains} items matching
2727
} the 'contains' schema
28-
contains-range-message = Expected an array that contains between {$minContains} and {$maxContains} items that pass the 'contains' schema
29-
contains-exact-message = Expected an array that contains {$minContains ->
30-
[1] one item that passes
31-
*[other] {$minContains} items that pass
28+
contains-range-message = Expected an array containing between {$minContains} and {$maxContains} items matching the 'contains' schema
29+
contains-exact-message = Expected an array containing {$minContains ->
30+
[1] exactly one item matching
31+
*[other] exactly {$minContains} items matching
3232
} the 'contains' schema
33-
uniqueItems-message = Duplicated item
33+
uniqueItems-message = Array items must be unique
3434
3535
// Object keywords
36-
maxProperties-message = Expected an object with at most {$maxProperties} properties
36+
maxProperties-message = Expected an object with no more than {$maxProperties} properties
3737
minProperties-message = Expected an object with at least {$minProperties} properties
38-
required-message = Required {$count ->
39-
[one] property {$required} is
40-
*[other] properties {$required} are
41-
} missing
38+
required-message = Missing required {$count ->
39+
[one] property: {$required}
40+
*[other] properties: {$required}
41+
}
4242
4343
// Applicators
44-
anyOf-message = Expected none of the alternatives match
45-
oneOf-message = {$matchCount ->
46-
[0] None
47-
*[other] More than one
48-
} of the alternatives match
44+
anyOf-message = Expected the value to match at least one alternative
45+
oneOf-message = Expected the value to match exactly one alternative, {$matchCount ->
46+
[0] but none
47+
*[other] but more than one
48+
} matched
4949
not-message = Expected a value that doesn't match the 'not' schema

0 commit comments

Comments
 (0)