UNPKG

azure-functions-swagger-ui

Version:

A simple npm module that integrates Swagger UI into Azure Functions, providing a user-friendly interface to visualize and interact with your API endpoints. Perfect for documenting and testing Azure Functions with minimal setup.

30 lines (29 loc) 1.37 kB
/** * Interface for Swagger UI options * @param doc_path // Path/url to Swagger/OpenAPI (YAML or JSON) file or jsdoc object or array of objects with path/url/jsdoc and name (required) * @param title Title for Swagger UI (optional) * @param favicon16 Path to 16x16 favicon image (optional) * @param favicon32 Path to 32x32 favicon image (optional) * @param css_path Path to custom CSS file (optional) * @param html_path Path to custom HTML file (optional) * @param display_topbar // 0: topbar is not displayed, 1: topbar displayed without searchbar/selectbar, 2: topbar displayed with searchbar/selectbar but without swagger logo, 3: topbar displayed with searchbar/selectbar and swagger logo (optional) */ export type SwaggerOptions = { doc_path: string | {} | Array<{ url: string | {}; name: string; }>; title?: string; favicon16?: string; favicon32?: string; css_path?: string; html_path?: string; display_topbar?: 0 | 1 | 2 | 3; }; /** * * @param fileName // The name of the HTML file to be created * @param swaggerOptions SwaggerOptions, { doc_path, title?, favicon16?, favicon32?, css_path?, display_topbar? : 0 | 1 | 2 | 3 } * @param route // The route where the Swagger UI will be available */ export declare function makeHtml(fileName: string, swaggerOptions: SwaggerOptions, route: string): void;