Corrected handling for absent settings.additionalProperties

This commit is contained in:
Shelby Sanders 2015-01-09 21:52:57 -08:00
parent 9de19e851e
commit 5fcc411c06
1 changed files with 4 additions and 2 deletions

View File

@ -105,9 +105,11 @@ var modelHelper = module.exports = {
out[name] = {
id: name,
properties: properties,
required: required,
additionalProperties: def.settings.additionalProperties
required: required
};
if (def.settings && typeof def.settings.additionalProperties != 'undefined') {
out[name].additionalProperties = def.settings.additionalProperties;
}
// Generate model definitions for related models
for (var r in modelClass.relations) {