How to use the koa-swagger-decorator.description function in koa-swagger-decorator

To help you get started, we’ve selected a few koa-swagger-decorator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github javieraviles / node-typescript-koa-rest / src / controller / general.ts View on Github external
import { BaseContext } from 'koa';
import { description, request, summary, tagsAll } from 'koa-swagger-decorator';

@tagsAll(['General'])
export default class GeneralController {

    @request('get', '/')
    @summary('Welcome page')
    @description('A simple welcome message to verify the service is up and running.')
    public static async helloWorld(ctx: BaseContext) {
        ctx.body = 'Hello World!';
    }

}