function apiValidator (schema, payload/*, description*/) {
	return new Promise(function Promise_apiValidator (resolve, reject) {
		if (schema === null) {
			reject(new error.ValidationError('Schema is undefined'));
			return;
		}

		if (typeof payload === 'undefined') {
			reject(new error.ValidationError('Payload is undefined'));
			return;
		}

		const validate = ajv.compile(schema);
		const valid    = validate(payload);

		if (valid && !validate.errors) {
			resolve(payload);
		} else {
			let message = ajv.errorsText(validate.errors);
			let err     = new error.ValidationError(message);
			err.debug   = [validate.errors, payload];
			reject(err);
		}
	});
}
@param {Object} schema
@param {Object} payload
@returns {Promise}