1.0.4 • Published 2 years ago

@types/koa-joi-router-docs v1.0.4

Weekly downloads
290
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for koa-joi-router-docs 1.0
// Project: https://github.com/o2team/koa-joi-router-docs#readme
// Definitions by: 4doge <https://github.com/4doge>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4

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.

1.0.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

4 years ago

1.0.0

6 years ago