Skip to content

JsonSchemaObject

@tsed/schema

Usage

typescript
import { JsonSchemaObject } from "@tsed/schema";

See /packages/specs/schema/src/domain/JsonSchema.ts.

Overview

ts
interface JsonSchemaObject extends Omit<JSONSchema7, "type" | "additionalProperties" | "items" | "pattern"> {
    type?: JSONSchema7["type"] | Type | null | (String | null | Date | Number | Object | Boolean)[];
    additionalProperties?: JsonSchemaObject | boolean | Type | JsonSchema;
    items?: JsonSchemaObject | boolean | Type | JsonSchema | (JsonSchemaObject | Type | JsonSchema)[];
    pattern?: string | RegExp;
}

type: JSONSchema7["type"] | Type | null |

ts
type?: JSONSchema7["type"] | Type | null | (String | null | Date | Number | Object | Boolean)[];

additionalProperties

ts
additionalProperties?: JsonSchemaObject | boolean | Type | JsonSchema;

items: JsonSchemaObject | boolean | Type | JsonSchema |

ts
items?: JsonSchemaObject | boolean | Type | JsonSchema | (JsonSchemaObject | Type | JsonSchema)[];

pattern

ts
pattern?: string | RegExp;

Released under the MIT License.