UNPKG

tsoa-custom-decorators

Version:

Build swagger-compliant REST APIs using TypeScript and Node

17 lines (14 loc) 561 B
import { Route } from '../../../src/decorators/route'; import { Body } from '../../../src/decorators/parameter'; import { Post } from '../../../src/decorators/methods'; import { TestModel } from '../testModel'; import { ModelService } from '../services/modelService'; @Route('PostTest') export class InvalidPostTestController { @Post('WithMultipleBody') public async postWithMultipleBodyParams( @Body() firstParam: TestModel, @Body()secondParam: TestModel): Promise<TestModel> { return new ModelService().getModel(); } }