@tsed/schema
Version:
JsonSchema module for Ts.ED Framework
20 lines (19 loc) • 845 B
TypeScript
import { OpenSpecHash, OpenSpecRef, OS3Example, OS3Parameter } from "@tsed/openspec";
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
import { JsonMap } from "./JsonMap.js";
import { JsonSchema } from "./JsonSchema.js";
export declare class JsonParameter extends JsonMap<OS3Parameter<JsonSchema>> {
$kind: string;
expression: string;
constructor(obj?: Partial<OS3Parameter<JsonSchema>>);
getName(): any;
name(name: string): this;
examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>): this;
description(description: string): this;
in(inType: string, expression?: string | any): this;
required(required: boolean): this;
schema(): JsonSchema;
schema(schema: JsonSchema): this;
itemSchema(schema?: JsonSchema): JsonSchema;
toJSON(options?: JsonSchemaOptions): any;
}