Home Reference Source Test

Function

Static Public Summary
public

async handler(event: *, objectPattern1: {"awsRequestId": *}, cb: *): *

public

validate(data: *): Object

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

Params:

NameTypeAttributeDescription
event *
objectPattern1 {"awsRequestId": *}
  • default: {"awsRequestId":null}
cb *

Return:

*

public validate(data: *): Object source

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:

NameTypeAttributeDescription
data *

Return:

Object

a mutated data object, containing any defaulted properties where defined in the schema.