npm.io
1.0.4 • Published 2 years ago

@types/koa-joi-router-docs

Licence
MIT
Version
1.0.4
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/koa-joi-router-docs

Summary

This package contains type definitions for koa-joi-router-docs (https://github.com/o2team/koa-joi-router-docs#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-joi-router-docs.

index.d.ts

import { Router } from "koa-joi-router";

export {};

declare namespace koaJoiRouterDocs {
    interface SpecConfig {
        info: {
            title: string;
            version: string;
            description: string;
        };
        basePath: string;
        tags: Array<{
            name: string;
            description: string;
        }>;
    }

    interface SpecOptions {
        warnFunc?: (() => void) | undefined;
        defaultResponses?: object | undefined;
    }

    type RouterOptions = object | string;
}

export class SwaggerAPI {
    addJoiRouter(router: Router, options?: koaJoiRouterDocs.RouterOptions): any;
    generateSpec(config: koaJoiRouterDocs.SpecConfig, options?: koaJoiRouterDocs.SpecOptions): object;
}

Additional Details

Credits

These definitions were written by 4doge.