Corrected generateModelDefinition() to scan for model references nested in other models

This commit is contained in:
Shelby Sanders 2014-08-06 00:31:34 -07:00
parent 5ef5baee06
commit 820c51fa7a
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,10 @@ var modelHelper = module.exports = {
// Eke a type out of the constructors we were passed.
prop = modelHelper.LDLPropToSwaggerDataType(prop);
processType(modelClass.app, prop.type, out);
if (prop.items) {
processType(modelClass.app, prop.items.type, out);
}
// Required props sit in a per-model array.
if (prop.required || (prop.id && !prop.generated)) {