UNPKG

@apvee/azure-functions-openapi

Version:

An extension for Azure Functions V4 that provides support for exporting OpenAPI spec files from annotated Azure Functions.

22 lines (21 loc) 1.08 kB
import { HttpRequestParams } from "@azure/functions"; /** * Converts an HttpRequestParams (Record<string, string>) object into a plain JavaScript object. * Since all values are strings, the result will have key-value pairs where both keys and values are strings. * * @param {HttpRequestParams} params - The HttpRequestParams object to be converted. * @returns {{ [key: string]: string }} - A plain object where keys and values are strings. */ export declare function convertHttpRequestParamsToObject(params: HttpRequestParams): { [key: string]: string; }; /** * Converts a URLSearchParams object into a plain JavaScript object. * If a key appears multiple times, the corresponding value will be an array of values. * * @param {URLSearchParams} params - The URLSearchParams object to be converted. * @returns {{ [key: string]: string | string[] }} - A plain object where keys are strings and values are either strings or arrays of strings. */ export declare function convertURLSearchParamsToObject(params: URLSearchParams): { [key: string]: string | string[]; };