appc-connector-utils
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -0,3 +1,3 @@ | ||
const dataValidator = require('../utils/dataValidator') | ||
const endpointSchema = require('./endpointSchema') | ||
const Validator = require('../utils/metadataValidator') | ||
@@ -11,3 +11,3 @@ module.exports = (Arrow) => { | ||
return endpointsDescriptions.map(function (description) { | ||
Validator.validate(description, endpointSchema) | ||
dataValidator.validate(description, endpointSchema) | ||
return Arrow.API.extend(description) | ||
@@ -14,0 +14,0 @@ }) |
@@ -18,2 +18,3 @@ const metadataValidator = require('./utils/metadataValidator') | ||
validateModelMetadata: metadataValidator.validateModelMetadata, | ||
validateEndpointMetadata: metadataValidator.validateEndpointMetadata, | ||
getRootModelName: modelAPI.getRootModelName, | ||
@@ -20,0 +21,0 @@ test: { |
const pluralize = require('pluralize') | ||
const dataValidator = require('../tools/dataValidator') | ||
const dataValidator = require('../utils/dataValidator') | ||
const metadataSchema = require('./metadataSchema') | ||
@@ -4,0 +4,0 @@ |
const dataValidator = require('../tools/dataValidator') | ||
const modelMetadataSchema = require('../model/metadataSchema') | ||
const endpointMetadataSchema = require('../endpoint/endpointSchema') | ||
module.exports = { | ||
validateModelMetadata: validateModelMetadata | ||
validateModelMetadata: validateModelMetadata, | ||
validateEndpointMetadata: validateEndpointMetadata | ||
} | ||
@@ -18,1 +20,12 @@ | ||
} | ||
/** | ||
* Validates endpoint metadata against schema. | ||
* | ||
* @param {Object} endpointMetadata the metadata that must be validated | ||
*/ | ||
function validateEndpointMetadata (endpointMetadata) { | ||
if (endpointMetadata) { | ||
return dataValidator.validate(endpointMetadata, endpointMetadataSchema) | ||
} | ||
} |
{ | ||
"name": "appc-connector-utils", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Utilities for Arrow Connectors", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57348
1168