I am using a php client generated with swagger codegen 2.3.1. also tried 2.4.0_snapshot, still has the same error. the swagger.json used for generation can be found here
I am trying to use a generated post function that has one parameter of type int[]
.
according to the generated documentation it should be used like this
$apiInstance = new Swagger\Client\Api\UniverseApi();
$ids = array(new \Swagger\Client\Model\int[]());
$datasource = "tranquility";
$result = $apiInstance->postUniverseNames($ids, $datasource);
if i define $ids
like that, it give me a syntax error, unexpected '[', expecting ')'
If I make $ids
an array, eg.:
array(2) {
[0]=>
int(96305152)
[1]=>
int(96075776)
}
it throws an exception:
Exception: Invalid resource type: array.