-
Notifications
You must be signed in to change notification settings - Fork 439
/
swagger-custom-options.interface.ts
49 lines (46 loc) · 1.35 KB
/
swagger-custom-options.interface.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
interface CommonSwaggerCustomOptions {
useGlobalPrefix?: boolean,
}
export interface ExpressSwaggerCustomOptions extends CommonSwaggerCustomOptions {
explorer?: boolean;
swaggerOptions?: Record<string, any>;
customCss?: string;
customCssUrl?: string;
customJs?: string;
customfavIcon?: string;
swaggerUrl?: string;
customSiteTitle?: string;
validatorUrl?: string;
url?: string;
urls?: Record<'url' | 'name', string>[];
}
export interface FastifySwaggerCustomOptions extends CommonSwaggerCustomOptions {
uiConfig?: Partial<{
deepLinking: boolean;
displayOperationId: boolean;
defaultModelsExpandDepth: number;
defaultModelExpandDepth: number;
defaultModelRendering: string;
displayRequestDuration: boolean;
docExpansion: string;
filter: boolean | string;
maxDisplayedTags: number;
showExtensions: boolean;
showCommonExtensions: boolean;
useUnsafeMarkdown: boolean;
syntaxHighlight:
| {
activate?: boolean;
theme?: string;
}
| false;
tryItOutEnabled: boolean;
validatorUrl: string | null;
}>;
initOAuth?: Record<string, any>;
staticCSP?: boolean | string | Record<string, string | string[]>;
transformStaticCSP?: (header: string) => string;
}
export type SwaggerCustomOptions =
| FastifySwaggerCustomOptions
| ExpressSwaggerCustomOptions;