Closed davidsneighbour closed 3 years ago
It get's weirder. If I suppress the warnings then the explorer expects string as parameter for POST:
Can you try changing the comment as follows
@param array $request_data {@type associative}
Instead and try!
The error stays. (I deleted the cache directory too.) I wonder if there is some deeper issue that results in it trying to be a string, but receiving array... chaos :)
Using the 3.1.0 tag by the way.
the json created for this function is
"/tours/charter/create": {
"post": {
"operationId": "charterCreateCreate",
"tags": [
"tours"
],
"parameters": [
{
"name": "charterCreateCreateModel",
"description": "request_data \n",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/charterCreateCreateModel"
}
}
],
"summary": " 🔓",
"description": "",
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "string"
}
}
}
}
}
Noted
Fixed in 8f038ef6bd75a7ea1fc2b5abe186bfb2cc1887b2 in V5 branch. The issue is because multiple return types are not supported in Explorer. Fix assumes the last one in the list as the type for Explorer's consideration
In your above example, it is boolean
Please test and let me know!
Now available in 5.0.7
My restler explorer is only working, if I set error_reporting to 0 before loading one specific class (amongst many). If not, it throws two warnings, that do not say much in sense of what is going wrong. The code that is "creating" the warnings is the following method:
The API method itself works as expected without thrown exceptions or warnings, only the Explorer refuses to load the methods. In swagger.json the following warnings come up (sorry image, i can't copy the warnings properly):
The resulting json after the warnings is properly formatted and has no errors.
index:146 is
$oRestler->handle();
Where should I look for the error?