tsoa-custom-decorators
Version:
Build swagger-compliant REST APIs using TypeScript and Node
30 lines (26 loc) • 893 B
text/typescript
import { Route } from '../../../src/decorators/route';
import { Delete } from '../../../src/decorators/methods';
import { Query } from '../../../src/decorators/parameter';
import { TestModel } from '../testModel';
import { ModelService } from '../services/modelService';
('DeleteTest')
export class DeleteTestController {
()
public async deleteWithReturnValue(): Promise<TestModel> {
return new ModelService().getModel();
}
('Current')
public async deleteCurrent(): Promise<void> {
return;
}
('{numberPathParam}/{booleanPathParam}/{stringPathParam}')
public async getModelByParams(
numberPathParam: number,
stringPathParam: string,
booleanPathParam: boolean,
() booleanParam: boolean,
() stringParam: string,
() numberParam: number): Promise<void> {
return;
}
}