Skip to content

Commit ceac236

Browse files
authored
Fix doc formatting for prefixItems (#1685)
1 parent 18de168 commit ceac236

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/json-schema.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -453,16 +453,16 @@ For the data array to be valid, the items with indices less than the number of s
453453

454454
_schema_:
455455

456-
```javascript
457-
{
458-
type: "array",
459-
prefixItems: [{type: "integer"}, {type: "string"}]
460-
}
461-
```
456+
```javascript
457+
{
458+
type: "array",
459+
prefixItems: [{type: "integer"}, {type: "string"}]
460+
}
461+
```
462462

463-
_valid_: `[1]`, `[1, "abc"]`, `[1, "abc", 2]`, `[]`
463+
_valid_: `[1]`, `[1, "abc"]`, `[1, "abc", 2]`, `[]`
464464

465-
_invalid_: `["abc", 1]`, `["abc"]`
465+
_invalid_: `["abc", 1]`, `["abc"]`
466466

467467
The schema in example will log warning by default (see `strictTuples` option), because it defines unconstrained tuple. To define a tuple with exactly 2 elements use [minItems](#minitems) and [items](#items-in-draft-2020-12) keywords (see example 2 in [items](#items-in-draft-2020-12)).
468468

0 commit comments

Comments
 (0)