Invalid Service Response

#1

I’m trying to get a service up and running. The service exposes a collection called systems and so it subscribes to get.systems. This works, and while I’m looking at resgate in debug mode, I can see it then follow up that reply with a get for system.system1 and another for system.system2 because those are the RIDs I returned.

Next, I see resgate show me the response code which is internal error, the message is “Invalid service response”, but it doesn’t tell me what’s invalid about it. Here is the JSON that I’m returning that is apparently invalid:

{
  "result" : {
     "components": "position, velocity",
     "framerate": 1,
     "name": "physics"
  }
}

I get this error whether I return a collection of 1 rid or 2 or 10. All of the single get replies my service makes seem to be invalid for some unknown reason.

#2

Looks like I didn’t wrap the JSON object in the model key. This requirement isn’t all that clear from the documentation.

Moderator: this can be closed.

#3

Hi Kevin, and welcome to the forum!

Agreed that the documentation can be made clearer.
I will add it as a task to improve the specification documentation, including some examples.

Best regards,
Samuel