@apvee/azure-functions-openapi
Version:
An extension for Azure Functions V4 that provides support for exporting OpenAPI spec files from annotated Azure Functions.
13 lines (12 loc) • 1.04 kB
TypeScript
import { OpenAPIDocumentInfo, OpenAPIObjectConfig } from "../core/types";
/**
* Registers an OpenAPI handler for an Azure Function.
*
* @param {'anonymous' | 'function' | 'admin'} authLevel - The authorization level required to access the function.
* @param {OpenAPIObjectConfig} configuration - The OpenAPI configuration object containing information about the API.
* @param {'2.0' | '3.0.3' | '3.1.0'} version - The OpenAPI version to use.
* @param {'json' | 'yaml'} format - The format of the OpenAPI document.
* @param {string} [route] - Optional. The route at which the OpenAPI document will be served. If not provided, a default route will be used based on the format and version.
* @returns {OpenAPIDocumentInfo} An object containing the title and URL of the registered OpenAPI document.
*/
export declare function registerOpenAPIHandler(authLevel: 'anonymous' | 'function' | 'admin', configuration: OpenAPIObjectConfig, version: '2.0' | '3.0.3' | '3.1.0', format: 'json' | 'yaml', route?: string): OpenAPIDocumentInfo;