Conversation
e2b66b9 to
0bdd20d
Compare
this would mean we throw an exception if the API answers with a new value in the union, which is something that AWS does not treat as a BC break.
I don't think having all nullable properties is a good idea. It makes the SDK types less precise for dubious benefits. See my comment on the issue showing that your "simple" code justifying this choice is actually buggy code (which won't be detectable by static analysis in this solution, while it could be detected in others) |
stof
left a comment
There was a problem hiding this comment.
If you want the convenience API for cases with known types, maybe we should follow the lead of the Kotlin SDK.
56b8195 to
db31b6d
Compare
b364e0d to
7fecd69
Compare
src/CodeGenerator/src/Generator/CodeGenerator/TypeGenerator.php
Outdated
Show resolved
Hide resolved
6b0f2ef to
3324be6
Compare
|
The last remaining thing is deciding whether "abstract class returns null by default or not" I need time to process this, and check if makes sense or not.
|
|
after looking deeper, indeed, having I've removed it from this PR |
b861147 to
cd5bba1
Compare
src/CodeGenerator/src/Generator/ResponseParser/RestJsonParser.php
Outdated
Show resolved
Hide resolved
acfc2c3 to
f634c31
Compare
fix #1900
This PR add support for union shape.
nullfor all membresstatic createmethods return the right child and throws exception if the child is unknown