forked from BRIKEV/express-jsdoc-swagger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
64 lines (53 loc) · 1.42 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Type definitions for express-jsdoc-swagger
// Project: https://github.com/BRIKEV/express-jsdoc-swagger
// Definitions by: Kevin MArtínez <https://github.com/kevinccbsg>
// Definitions: https://github.com/BRIKEV/express-jsdoc-swagger/index.d.ts
// TypeScript Version: 3.9.7
import { EventEmitter } from "events";
import express from "express";
import { SwaggerUiOptions } from "swagger-ui-express";
interface ContactObject {
name: string;
url?: string;
email?: string;
}
interface LicenseObject {
name: string;
url?: string;
email?: string;
}
interface InfoObject {
title: string;
version: string;
description?: string;
termsOfService?: string;
contact?: ContactObject;
license?: LicenseObject;
}
interface SecurityObject {
type: string;
scheme: string;
}
interface Security {
[key: string]: SecurityObject;
}
interface Servers {
url: string;
description: string;
variables?: object;
}
interface Options {
info: InfoObject;
baseDir: string;
filesPattern: string | string[];
security?: Security;
servers?: string[] | Servers[];
exposeSwaggerUI?: boolean;
swaggerUIPath?: string;
exposeApiDocs?: boolean;
apiDocsPath?: string;
swaggerUiOptions?: SwaggerUiOptions;
}
type UserSwagger = Record<string, unknown>;
type EventEmiterHandler = (options: Options, userSwagger?: UserSwagger) => EventEmitter;
export default function expressJSDocSwagger(app: express.Application): EventEmiterHandler;