interface ArraySchema {
    $comment?: string;
    $id?: string;
    allOf?: Partial<Schema>[];
    anyOf?: Partial<Schema>[];
    default?: any;
    definitions?: Record<string, Schema>;
    description?: string;
    else?: Partial<Schema>;
    examples?: any[];
    if?: Partial<Schema>;
    items: {} | Schema;
    nullable?: boolean;
    then?: Partial<Schema>;
    title?: string;
    type: "array";
}

Hierarchy (view full)

Properties

$comment?: string

A comment to be added to the schema

$id?: string

Schema id

allOf?: Partial<Schema>[]

A set of schemas which must all match

anyOf?: Partial<Schema>[]

A set of schemas of which at least one must match

default?: any

Default value to be assigned when no value is given in the document

definitions?: Record<string, Schema>

Additional schema definition to reference from within the schema

description?: string

Schema description

else?: Partial<Schema>

A schema to apply if the conditional schema from if fails

examples?: any[]

A list of example values that match this schema

A conditional schema to check, controls schemas defined in then and else

items: {} | Schema

The schema for the items in the array

Type declaration

    nullable?: boolean

    Open API 3.0 spec states that any value that can be null must be declared nullable

    Default

    false
    
    then?: Partial<Schema>

    A schema to apply if the conditional schema from if passes

    title?: string

    Schema title

    type: "array"