Skip to content

compile

@tsed/schema

Usage

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

See /packages/specs/schema/src/utils/compile.ts.

Overview

ts
function compile(model: Type<any> | JsonParameterStore | JsonSchema, options?: JsonSchemaOptions): any;
  • model (Type<any> | JsonParameterStore | JsonSchema): Class, parameter store, or JsonSchema to compile.

  • options (JsonSchemaOptions): Optional. JSON schema generation options.

Description

Compile a class, parameter store, or JsonSchema into a plain JSON schema object.

This is an alias of getJsonSchema(...).

Released under the MIT License.