import { Class, Context, HttpResponseBadRequest, HttpResponseMovedPermanently, HttpResponseNotFound, HttpResponseOK, OpenApi } from '@foal/core'; /** * Serve Swagger UI to visualize and interact with API resources. * * @export * @abstract * @class SwaggerController */ export declare abstract class SwaggerController { openApi: OpenApi; /** * Specify the OpenAPI Specification(s) and their location(s). * * If a controller class is provided, then an OpenAPI Specification is generated * from its definition. * * @abstract * @type {({ url: string } | * { controllerClass: Class } | * ( * { name: string, url: string, primary?: boolean } | * { name: string, controllerClass: Class, primary?: boolean } * )[])} * @memberof SwaggerController */ abstract options: { url: string; } | { controllerClass: Class; } | ({ name: string; url: string; primary?: boolean; } | { name: string; controllerClass: Class; primary?: boolean; })[]; /** * Extend Swagger UI options. * * See https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/. * * @type {object} * @example * uiOptions = { docExpansion: 'none' }; * @memberof SwaggerController */ uiOptions: object; getOpenApiDefinition(ctx: Context): HttpResponseNotFound | HttpResponseOK | HttpResponseBadRequest; index(ctx: Context): Promise>; main(ctx: Context): Promise>; swaggerUi(): Promise>; swaggerUiBundle(): Promise>; swaggerUiStandalonePreset(): Promise>; private createHttpResponseFile; }