Search code examples
restler

Restler remove a level of the body parameters


So let's say I have a class defined with 3 public properties, and then that is the only parameter for the body of my API method. So I end up having to do something like this:

{
   "myObj" : {
      "param1" : ...
      "param2" : ...
      "param3" : ...
   }
}

Is there some way to not have to specify the myObj part, and just put the class parameters directly?

{
  "param1" : ...
  "param2" : ...
  "param3" : ...
}

If it's the ONLY body parameter this feels much cleaner.


Solution

  • It exactly works that way! Explorer also does that simplification