UNPKG

adonis5-swagger

Version:
28 lines (27 loc) 875 B
/// <reference types="swagger-jsdoc" /> declare module '@ioc:Adonis/Addons/Swagger' { import swaggerJSDoc from 'swagger-jsdoc'; type SwaggerMode = 'PRODUCTION' | 'RUNTIME'; type CredentialsCheckFunction = (login: string, password: string) => Promise<boolean> | boolean; type AuthCredentials = { login: string; password: string; }; type SwaggerAuthConfig = { authMiddleware: string; authCheck?: CredentialsCheckFunction; authCredentials?: AuthCredentials; }; interface SwaggerConfig { uiEnabled: boolean; uiUrl: string; specEnabled: boolean; specUrl: string; middleware: string[]; options: swaggerJSDoc.Options; specFilePath?: string; mode?: SwaggerMode; swaggerUiDistPath?: string; swaggerAuth?: SwaggerAuthConfig; } }