JsonRequestBody
@tsed/schema
Usage
typescript
import { JsonRequestBody } from "@tsed/schema";
See /packages/specs/schema/src/types/domain/JsonRequestBody.ts.
Overview
ts
class JsonRequestBody extends JsonMap<JsonRequestBodyOptions> {
$kind: string;
constructor(obj?: Partial<JsonRequestBodyOptions>);
description(description: string): this;
content(content: OpenSpecHash<OS3MediaType<JsonSchema>>): this;
addContent(mediaType: string, schema: JsonSchema, examples?: any): this;
required(required: boolean): this;
}
$kind
ts
$kind: string;
description
ts
description(description: string): this;
content
ts
content(content: OpenSpecHash<OS3MediaType<JsonSchema>>): this;
addContent
ts
addContent(mediaType: string, schema: JsonSchema, examples?: any): this;
required
ts
required(required: boolean): this;