Skip to content

AnyJsonSchema

@tsed/schema

Usage ​

typescript
import { AnyJsonSchema } from "@tsed/specs/schema/src/domain/JsonSchema";

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

Overview ​

ts
type AnyJsonSchema<T = any> = JsonSchemaObject | JSONSchema7 | JsonSchema<T> | JsonLazyRef | {
    label?: string;
} | Type | AbstractType<any>;

Description ​

Union type representing any valid JSON schema representation.

This type accepts various schema formats including standard JSON Schema objects, Ts.ED JsonSchema instances, lazy references, TypeScript classes, and label objects. It provides maximum flexibility for schema definition across the framework.

label ​

ts
label?: string;

Released under the MIT License.