code: 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
    )
  }
docs: 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.