API Platform version(s) affected: 2.5.3
Description
Having a resource that uses DTO for input and that class contains property that contains array of DTOs of other class.
Generated documentation says that the property has type of array of strings.
Sending a request actually makes the data of the nested dto available as an associative array, although I'd expect it to be deserialized into an object.
How to reproduce
/**
* @ApiResource(
* collectionOperations={
* "post"={
* "status"=202,
* "input"=App\Command\CreateFoo::class,
* "output"=false
* },
* },
* itemOperations={},
* messenger="input",
* output=false,
* )
*/
class TestResource
{
// not important
public $foo;
}
final class CreateFoo
{
// not important
public $name;
/** @var CreateBar[] */
public $bars = [];
}
final class CreateBar
{
public $baz;
}
Possible Solution
Additional Context
API Platform version(s) affected: 2.5.3
Description
Having a resource that uses DTO for input and that class contains property that contains array of DTOs of other class.
Generated documentation says that the property has type of array of strings.
Sending a request actually makes the data of the nested dto available as an associative array, although I'd expect it to be deserialized into an object.
How to reproduce
Possible Solution
Additional Context