UNPKG

class-validator-jsonschema

Version:

Convert class-validator-decorated classes into JSON schema

7 lines (6 loc) 447 B
import { SchemaObject } from 'openapi3-ts'; import 'reflect-metadata'; import { IOptions } from './options'; export declare type DecoratorSchema = SchemaObject | ((source: SchemaObject, options: IOptions) => SchemaObject); export declare function JSONSchema(schema: DecoratorSchema): (target: object | Function, key?: string | undefined) => void; export declare function getMetadataSchema(target: object | Function, key: string): DecoratorSchema;