I try override find api of strongloop rest endpoint. I want to return an array of objects. But how do I specify the schema for the object? As you can see from the picture above, the model schema is empty.
Below is the code of my company model remoteMethod:
Company.remoteMethod(
'find',
{
accepts: {arg: 'msg', type: 'string'},
returns: {type: 'array', root: true},
http: {path: '/', verb:'get'}
}
)
company
model? If so, what is the configuration? That config defines your schema... Look at the documentation for how to create models. – Cougar