UNPKG

nestjs-api-tools

Version:

Wrappers for convenient API development including validation, logging and i18n wrappers

17 lines (13 loc) 488 B
import {HttpCode, HttpStatus, applyDecorators} from '@nestjs/common'; import {ApiNoContentResponse} from '@nestjs/swagger'; export interface NoContentApiResponseOptions { description: string; type?: any; } /** * 204 response decorator for Swagger autogenerated documentation. */ export const NoContentApiResponse = (options: NoContentApiResponseOptions): MethodDecorator & ClassDecorator => applyDecorators( HttpCode(HttpStatus.NO_CONTENT), ApiNoContentResponse(options), );