Method decorator which describes an HTTP status code that can be returned by this Express route. This decorator can be applied multiple times to a single Express route to describe all status codes produced by this route.
@Controller('/api', 'User', 'User Management Routes')class User { @HttpResponse(201, 'New user record created') @HttpResponse(400, 'Missing required data') @HttpPost('/user', 'Create a new user') async createUser( @RequestParam('username') username: string, @RequestParam('password') password: string, @Response() res: ExpressResponse ): Promise<void> { ... }}
Class method to be registered with the Express application as a route
HTTP status code
Description of the scenario in which this HTTP status code will be produced
Optional
Generated using TypeDoc
Method decorator which describes an HTTP status code that can be returned by this Express route. This decorator can be applied multiple times to a single Express route to describe all status codes produced by this route.
Example