mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
A model with an array property used to have the wrong PHP typehint in the setter: the array item object type instead of "array"
This commit is contained in:
parent
2c418e1b71
commit
7f8ff35245
@ -424,6 +424,10 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
|
||||
var.vendorExtensions.put("x-parameterType", typeHint);
|
||||
}
|
||||
|
||||
if (var.isContainer) {
|
||||
var.vendorExtensions.put("x-parameterType", getTypeHint(var.dataType + "[]"));
|
||||
}
|
||||
|
||||
// Create a variable to display the correct data type in comments for models
|
||||
var.vendorExtensions.put("x-commentType", var.dataType);
|
||||
if (var.isContainer) {
|
||||
|
@ -203,7 +203,7 @@ class Pet
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhotoUrls($photoUrls)
|
||||
public function setPhotoUrls(array $photoUrls)
|
||||
{
|
||||
$this->photoUrls = $photoUrls;
|
||||
|
||||
@ -227,7 +227,7 @@ class Pet
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTags(Tag $tags = null)
|
||||
public function setTags(array $tags = null)
|
||||
{
|
||||
$this->tags = $tags;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user