You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
If a model/parameter (model 1) extends another model/parameter (model 2) that itself extends another model/parameter (model 3), it should be assumed that model 1 has properties that were pulled through from model 3, but instead only values from model 2 are pulled through.
How to reproduce
Create 3 models:
model 3 have a property on it
model 2 extends model 3 with a different property
model 1 extends model 2
You'd expect model 1 to then have properties from both model 2 and 3, but it only has properties from model 2.
Possible Solution
I believe the issue is being caused from when the extends is converted to an array to add to the data on parameter construction in the Parameter class. $data += $extends->toArray(); The toArray method returns the originalData property, which is never modified even when extending.
The possible solution would be to additionally merge the $extends->toArray() data in with the $this->originalData at the same time as when it's added to the current $data. Either that or set $data to $this->originalData (which currently happens first) after the $ref and extends functionality is ran.
The text was updated successfully, but these errors were encountered:
Set $data to originalData after extend to allow nested models that are extended by other models to pass properties through to parents, per issue 184 (guzzle#184).
Description
If a model/parameter (model 1) extends another model/parameter (model 2) that itself extends another model/parameter (model 3), it should be assumed that model 1 has properties that were pulled through from model 3, but instead only values from model 2 are pulled through.
How to reproduce
Create 3 models:
You'd expect model 1 to then have properties from both model 2 and 3, but it only has properties from model 2.
Possible Solution
I believe the issue is being caused from when the extends is converted to an array to add to the data on parameter construction in the Parameter class.
$data += $extends->toArray();
The toArray method returns the originalData property, which is never modified even when extending.The possible solution would be to additionally merge the
$extends->toArray()
data in with the$this->originalData
at the same time as when it's added to the current $data. Either that or set $data to $this->originalData (which currently happens first) after the $ref and extends functionality is ran.The text was updated successfully, but these errors were encountered: