JsonParameter
@tsed/schema
Usage
typescript
import { JsonParameter } from "@tsed/schema";
Overview
ts
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;
}
$kind
ts
$kind: string;
expression
ts
expression: string;
getName
ts
getName(): any;
name
ts
name(name: string): this;
examples
ts
examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>): this;
description
ts
description(description: string): this;
in
ts
in(inType: string, expression?: string | any): this;
required
ts
required(required: boolean): this;
schema
ts
schema(): JsonSchema;
schema
ts
schema(schema: JsonSchema): this;
itemSchema
ts
itemSchema(schema?: JsonSchema): JsonSchema;
toJSON
ts
toJSON(options?: JsonSchemaOptions): any;