Namespaced response classes generates incorrect Swagger JSON
When using a class as a response type that is part of a namespace (Company\Package\Responses\MyResponse), the swagger spec is incorrectly generated.
What happens now is the swagger JSON that is generated looks like this:
"apis": [
{
"path": "/foo/bar",
"operations": [
{
.......
"type": "Company\\Package\\Responses\\MyResponse"
}
]
}
]
The models section of the JSON, however, is populated like so:
"models": {
"MyResponse": {
"id": "MyResponse",
.........
}
}
It seems that Swagger-UI doesn't know how to match the two because of the namespacing. I'm not sure if the best fix is to namespace both (to avoid potential conflicts with larger APIs) or if namespaces should be stripped (exposing extra information that isn't useful to clients).
I'd lean towards namespacing, which I'm currently doing by removing this line: https://github.com/Luracast/Restler/blob/3.0.0-RC6/vendor/Luracast/Restler/Explorer.php#L412
Please re-open if the issue still exists in explorer v2