UNPKG

@dedel.alex/adonis6-swagger

Version:
25 lines (24 loc) 726 B
import swaggerJSDoc from 'swagger-jsdoc'; export type SwaggerMode = 'PRODUCTION' | 'RUNTIME'; export type CredentialsCheckFunction = (login: string, password: string) => Promise<boolean> | boolean; export type AuthCredentials = { login: string; password: string; }; export type SwaggerAuthConfig = { authMiddleware: string; authCheck?: CredentialsCheckFunction; authCredentials?: AuthCredentials; }; export interface SwaggerConfig { uiEnabled: boolean; uiUrl: string; specEnabled: boolean; specUrl: string; middleware: string[]; options: swaggerJSDoc.Options; specFilePath?: string; mode?: SwaggerMode; swaggerUiDistPath?: string; swaggerAuth?: SwaggerAuthConfig; }