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:
parent
476b179f98
commit
6319572a55
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue