UNPKG

@scalar/oas-utils

Version:

Open API spec and Yaml handling utilities

22 lines 1.22 kB
import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/parameter'; import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations'; import type { ReferenceObject } from '@scalar/workspace-store/schemas/v3.1/strict/reference'; import { type Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard'; import type { Request as HarRequest } from 'har-format'; type ProcessedParameters = { url: string; headers: HarRequest['headers']; queryString: HarRequest['queryString']; cookies: HarRequest['cookies']; }; /** Ensures we don't have any references in the parameters */ export declare const deReferenceParams: (params: Dereference<OperationObject>["parameters"]) => ParameterObject[]; /** * Process OpenAPI parameters and return the updated properties. * Handles path, query, and header parameters with various styles and explode options. * * @see https://spec.openapis.org/oas/latest.html#style-values */ export declare const processParameters: (harRequest: HarRequest, parameters: (ParameterObject | ReferenceObject)[], example?: unknown) => ProcessedParameters; export {}; //# sourceMappingURL=process-parameters.d.ts.map