Commit c02e181
authored
internal: update GetResourceConfig to use dyn/convert rather than JSON roundtrip (#3646)
## Why
For direct, we fetch configs as struct instances via GetResourceConfig,
which is using json roundtrip between dyn value and struct. That,
however, does not work well when there references in the config, see
#3645 for details.
This switches to converting dyn.Value with dyn/convert ToTyped function.
The function was not used previously because it did not handle
ForceSendFields correctly for embedded structs which caused JSON
marshaller in Go SDK to return error. This was fixed in
#3650 and
#3649
## Tests
Existing tests.1 parent be89cdb commit c02e181
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
609 | 608 | | |
610 | 609 | | |
611 | 610 | | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | 611 | | |
619 | | - | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
620 | 615 | | |
621 | 616 | | |
622 | 617 | | |
| |||
0 commit comments