-
Notifications
You must be signed in to change notification settings - Fork 74
Fix issues with getters returning collection types. #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issues with getters returning collection types. #541
Conversation
ac336c0 to
792dccf
Compare
792dccf to
092c456
Compare
| foreach ($this->_propDict['<#=camelCasePropertyName#>'] as $singleValue) { | ||
| $<#=camelCasePropertyName#> []= new <#=propertyTypeReference#>($singleValue); | ||
| } | ||
| $this->_propDict['<#=camelCasePropertyName#>'] = $<#=camelCasePropertyName#>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps something to think about in Kiota...
Should a getter be modifying/setting the value of a property? Maybe this logic should be handled within the constructor?/somewhere else during object creation/deserialization?
207684f to
096b6df
Compare
096b6df to
b04497a
Compare
test/Typewriter.Test/TestDataPHP/com/Microsoft/Graph/CallRecords/Model/CallRecord.php
Show resolved
Hide resolved
b04497a to
cb464d7
Compare
MIchaelMainer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to batch these breaking changes with other breaking changes. We will need to capture information in an upgrade guide as customers will have taken a dependency on the previous broken behavior by implementing a workaround.
|
Changed the base branch of this PR to |
Summary
The getters for collection type properties are never creating the class objects in the right way. For instance, having the following data,
the getters create one object passing the array of JSON objects as an argument.
Current behaviour.
Expected behaviour.
Instead, we would like to create an instance of
Attendeefor eachattendeeas follows,Generated code differences
Command line arguments to run these changes
Provide the command line arguments here so that reviewers can quickly repro the results of changes.
Links to issues or work items this PR addresses
Fixes #496
Fixes #87
Fixes #97
Fixes #115
Fixes #222
Fixes #76
Closes #523
Microsoft Reviewers: Open in CodeFlow