Function
| Static Public Summary | ||
| public |
async handler(event: *, objectPattern1: {"awsRequestId": *}, cb: *): * |
|
| public |
Wraps the AJV library to provide a helper function which validates the passed data object against the imported schema file. |
|
Static Public
public async handler(event: *, objectPattern1: {"awsRequestId": *}, cb: *): * source
import {handler} from 'pipeline-transfer/functions/transfer/transfer.js'Params:
| Name | Type | Attribute | Description |
| event | * | ||
| objectPattern1 | {"awsRequestId": *} |
|
|
| cb | * |
Return:
| * |
public validate(data: *): Object source
import validate from 'pipeline-transfer/functions/transfer/transfer/validate/validate.js'Wraps the AJV library to provide a helper function which validates the passed data object against the imported schema file.
If the schema fails to validate, an array of error messages are generated.
Params:
| Name | Type | Attribute | Description |
| data | * |
Return:
| Object | a mutated data object, containing any defaulted properties where defined in the schema. |