Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Validates the collection configuration object passed to it. Returns true or false. If invalid it
* will have a errors attribute on the function with the list of errors.
*/
exports.validateCollectionsConfiguration = ajv.compile(collectionSchema,
{
schemas: { 'ingest_common_schema.json': compiledCommon.schema },
allErrors: true
});
/**
* Validates the message against the JSON schema. Returns true or false. If invalid it
* will have a errors attribute on the function with the list of errors.
*/
exports.validateMessageEnvelope = ajv.compile(messageSchema,
{
schemas: { 'ingest_common_schema.json': compiledCommon.schema },
allErrors: true
});