JsonSchemaOptions
@tsed/schema
Usage
typescript
import { JsonSchemaOptions } from "@tsed/schema";
See /packages/specs/schema/src/types/interfaces/JsonSchemaOptions.ts.
Overview
ts
interface JsonSchemaOptions {
useAlias?: boolean;
components?: Record<string, any>;
specType?: SpecTypes;
groups?: string[] | false;
groupsName?: string;
customKeys?: boolean;
inlineEnums?: boolean;
[key: string]: any;
}
useAlias
ts
useAlias?: boolean;
Map properties with the alias name. By default, false
components
ts
components?: Record<string, any>;
Reference to components Object.
specType
ts
specType?: SpecTypes;
Define Spec types level
groups
ts
groups?: string[] | false;
Define a groups restriction to generate the JsonSchema. Set false to disable groups.
groupsName
ts
groupsName?: string;
Set the postfix groups name for generated model and ref.
customKeys
ts
customKeys?: boolean;
Generate custom keys when SpecType is JSON.
inlineEnums
ts
inlineEnums?: boolean;
Inline enums when enum instead of using $ref.
[key: string]
ts
[key: string]: any;