@contember/schema-utils
Advanced tools
Comparing version 0.9.2-alpha.2 to 0.9.2-alpha.3
@@ -237,3 +237,3 @@ "use strict"; | ||
} | ||
const extra = utils_1.checkExtraProperties(operations, ['read', 'create', 'update', 'delete']); | ||
const extra = utils_1.checkExtraProperties(operations, ['read', 'create', 'update', 'delete', 'customPrimary']); | ||
if (extra.length) { | ||
@@ -251,2 +251,8 @@ errorBuilder.add('Unsupported properties found: ' + extra.join(', ')); | ||
} | ||
if (operations.customPrimary !== undefined) { | ||
if (typeof operations.customPrimary !== 'boolean') { | ||
errorBuilder.for('customPrimary').add('Must be boolean'); | ||
} | ||
validOperations.customPrimary = operations.customPrimary; | ||
} | ||
return validOperations; | ||
@@ -253,0 +259,0 @@ } |
{ | ||
"name": "@contember/schema-utils", | ||
"version": "0.9.2-alpha.2", | ||
"version": "0.9.2-alpha.3", | ||
"license": "Apache-2.0", | ||
@@ -9,3 +9,3 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@contember/schema": "^0.9.2-alpha.2" | ||
"@contember/schema": "^0.9.2-alpha.3" | ||
}, | ||
@@ -12,0 +12,0 @@ "devDependencies": { |
@@ -310,3 +310,3 @@ import { Acl, Model } from '@contember/schema' | ||
} | ||
const extra = checkExtraProperties(operations, ['read', 'create', 'update', 'delete']) | ||
const extra = checkExtraProperties(operations, ['read', 'create', 'update', 'delete', 'customPrimary']) | ||
if (extra.length) { | ||
@@ -324,2 +324,8 @@ errorBuilder.add('Unsupported properties found: ' + extra.join(', ')) | ||
} | ||
if (operations.customPrimary !== undefined) { | ||
if (typeof operations.customPrimary !== 'boolean') { | ||
errorBuilder.for('customPrimary').add('Must be boolean') | ||
} | ||
validOperations.customPrimary = operations.customPrimary as boolean | ||
} | ||
@@ -326,0 +332,0 @@ return validOperations |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
686447
3495