Skip to content

Commit 24f9ea9

Browse files
not-my-profileomermecitoglu
authored andcommitted
fix: items must be a schema (and add prefixItems)
This was changed in JSON Schema Specification Draft 2020-12 (which is the version of JSON Schema used by OpenAPI 3.1). https://json-schema.org/draft/2020-12/json-schema-core#name-changelog: > Array-value "items" functionality is now "prefixItems"
1 parent 90fe4d1 commit 24f9ea9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/schema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ type IntegerSchema = {
7575

7676
type ArraySchema = {
7777
type: "array",
78-
items: SchemaObject | SchemaObject[],
78+
items?: SchemaObject,
79+
prefixItems?: SchemaObject[],
7980
minItems?: number,
8081
maxItems?: number,
8182
uniqueItems?: boolean,

0 commit comments

Comments
 (0)