UNPKG

553 BTypeScriptView Raw
1import { ParameterObject } from '@loopback/openapi-v3';
2import { ValueValidationOptions } from '../';
3/**
4 * Coerce the http raw data to a JavaScript type data of a parameter
5 * according to its OpenAPI schema specification.
6 *
7 * @param data - The raw data get from http request
8 * @param schema - The parameter's schema defined in OpenAPI specification
9 * @param options - The ajv validation options
10 */
11export declare function coerceParameter(data: string | undefined | object, spec: ParameterObject, options?: ValueValidationOptions): Promise<any>;