interface ObjectSchema {
    $comment?: string;
    $id?: string;
    additionalProperties?: boolean | Schema;
    allOf?: Partial<Schema>[];
    anyOf?: Partial<Schema>[];
    default?: any;
    definitions?: Record<string, Schema>;
    description?: string;
    else?: Partial<Schema>;
    examples?: any[];
    if?: Partial<Schema>;
    nullable?: boolean;
    patternProperties?: ObjectProperties;
    properties?: ObjectProperties;
    required?: string[];
    then?: Partial<Schema>;
    title?: string;
    type: "object";
}

Hierarchy (view full)

Properties

$comment?: string

A comment to be added to the schema

$id?: string

Schema id

additionalProperties?: boolean | Schema

Specifies whether additional properties on the object are allowed, and optionally what schema they should adhere to

Default

false
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

nullable?: boolean

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

Default

false
patternProperties?: ObjectProperties

Describe properties that have keys following a given pattern

properties?: ObjectProperties

Describe the properties of the object

required?: string[]

The required properties of the object

then?: Partial<Schema>

A schema to apply if the conditional schema from if passes

title?: string

Schema title

type: "object"