Hello friends Restler,
I'm currently trying to switch to Restler as our main Rest-Framework. What really motivated my decision was respect for swagger. It is very important for me to have good auto-generated documentation for a growing system.
So my problem is that I cannot find a way to use "complex objects" as message parameters, as indicated in swagger here: https://github.com/wordnik/swagger-core/wiki/Parameters .
Of course, you could just extract everything from the post-assembler array and then check for the structure of the objects, but this will not be documented and the client will not know what structures are expected from it. Therefore, I would have to write a specification. by hand ...
Example:
protected function post(Account $account){...}
It will just be placed as undefined "Object" in resource.json, and not as the "complex type" associated with the Account object (this works fine for returned objects, by the way)
Resource.json
"parameters": [ { "name": "REQUEST_BODY", "description": "Paste JSON data here with the following property.<hr/><mark>account</mark> <i>(required)</i>: add <mark>@param {type} $account {comment}</mark> to describe here", "paramType": "body", "required": true, "allowMultiple": false, "dataType": "Object", "defaultValue": "{\n \"account\": \"\"\n}" } ],
Am I missing something or is this function not implemented?
Thanks in advance for your help!
UPDATE: I managed to get serialized objects directly from the mail method nativly, which I, although it was not possible. This does not solve the problem with an automatic document, but is still very valuable.