function validateEndpointData(
  data,
  { prettyErrorMessage = 'invalid response data', includeKeys = false } = {}
) {
  return validate(
    {
      ErrorClass: InvalidResponse,
      prettyErrorMessage,
      includeKeys,
      traceErrorMessage: 'Response did not match schema',
      traceSuccessMessage: 'Response after validation',
      allowAndStripUnknownKeys: false,
    },
    data,
    endpointSchema
  )
}
function validateEndpointData(
  data,
  { prettyErrorMessage = 'invalid response data', includeKeys = false } = {}
) {
  return validate(
    {
      ErrorClass: InvalidResponse,
      prettyErrorMessage,
      includeKeys,
      traceErrorMessage: 'Response did not match schema',
      traceSuccessMessage: 'Response after validation',
      allowAndStripUnknownKeys: false,
    },
    data,
    endpointSchema
  )
}
function validateEndpointData ( data , { prettyErrorMessage = 'invalid response data' , includeKeys = false } = { } ) { return validate ( { ErrorClass : InvalidResponse , prettyErrorMessage , includeKeys , traceErrorMessage : 'Response did not match schema' , traceSuccessMessage : 'Response after validation' , allowAndStripUnknownKeys : false , } , data , endpointSchema ) }
Strictly validate according to the endpoint schema. This rejects unknown / invalid keys. Optionally it prints those keys in the message in order to provide detailed feedback.
Strictly validate according to the endpoint schema . This rejects unknown / invalid keys . Optionally it prints those keys in the message in order to provide detailed feedback .
Validate endpoint data