I trying to write rest api client with vibe.d rest generator and figured that the such code:
class App
{
string id;
string cmd;
}
interface IntREST
{
@path("/apps")
@method(HTTPMethod.POST)
App postApp(App app);
}
sends body like:
{
"app": {
"id": "value",
"cmd": "command"
}
}
but I need to send without nesting into "app":
{
"id": "value",
"cmd": "command"
}
How I can avoid such behavior like nesting?