Fix up loopback.rest() model definition hack.

In its previous form, array return types were being returned simply
as {type: 'array'}, with their `items` definition forgotten.
This commit is contained in:
Samuel Reed 2014-07-18 17:23:51 -05:00
parent 476b179f98
commit 6319572a55
1 changed files with 1 additions and 4 deletions

View File

@ -88,10 +88,7 @@ var routeHelper = module.exports = {
if (firstReturn.type === 'object') {
firstReturn.type = classDef.name;
} else if (firstReturn.type === 'array') {
firstReturn.type = 'array';
firstReturn.items = {
'$ref': classDef.name
};
firstReturn.type = [classDef.name];
}
}