import { SwaggerRouter } from 'koa-swagger-decorator';

const router = new SwaggerRouter();

router.swagger({
    title:"List列表",
    description:"API DOC",
    version:"1.1.0",
    prefix: '/api',
    swaggerHtmlEndpoint: '/index.html',
    swaggerJsonEndpoint: '/swagger-json',
    swaggerOptions: {
        securityDefinitions: {
            ApiKeyAuth: {
                type: 'apiKey',
                in: 'header',
                name: 'QianJia'
            }
        }
    },
    swaggerConfiguration: {
        display: {
            defaultModelsExpandDepth: 4,
            defaultModelExpandDepth: 3,
            docExpansion: 'list',
            defaultModelRendering: 'model'
        }
    }
});

router.mapDir(`service`);

export default router;