Skip to content

tsoa-next / tsoa-next / Consumes

Function: Consumes()

ts
function Consumes(value): MethodDecorator;

Defined in: packages/runtime/src/decorators/parameter.ts:109

Overrides the media type used to document a request body for a single action.

Parameters

value

string

The request body media type, for example application/json. See Swagger request-body documentation.

Returns

MethodDecorator

TypeScript-first OpenAPI generation, route generation, and runtime validation.