I am new to Strongloop, and I canโt find information on how to set up a response class (model diagram for the object I built), and I donโt know how to show an object with user data in the API Explorer.

For example, I have a custom remote method called score
POST /Challenges/score
I want to show the user model diagram instead of the individual parameters for the data parameter, and not the model diagram for calling, the data on the body have all the parameters and shows the user the data type: model diagram, is this possible?
{ "id": "string", "limit": 0, "order": "string", "userId": "string" }
On the other hand, in the Response class, I want to show the schema for the response object. Something like that:
{ "id":"string", "userId":"string", "user": {}, "totalScore":0, "tags": [] }
I looked at different questions ( this and this ), but I can not find something to solve these problems.
Update
Here is the definition of the remote method
Challenge.remoteMethod('score', { accepts: { arg: 'data', type: 'object', http: { source: 'body' } }, returns: {arg: 'scores', type: 'array'}, http: {path: '/score', verb: 'post'} });
methods response model loopbackjs strongloop
jrltt
source share