Map interface{} RPC projections correctly
A property whose type is `interface{}` in the IDL ought to be projected as a "JSON-like" map, just like it is on the Coconut package side of things, which means a `map[string]interface{}`.
This commit is contained in:
parent
72b4035f3a
commit
75a897c23f
1 changed files with 2 additions and 1 deletions
|
@ -454,7 +454,8 @@ func (g *RPCGenerator) GenTypeName(t types.Type) string {
|
|||
contract.Failf("Unrecognized GenTypeName basic type: %v", k)
|
||||
}
|
||||
case *types.Interface:
|
||||
return "resource.PropertyMap"
|
||||
// interface{} properties become "JSON-like" maps.
|
||||
return "map[string]interface{}"
|
||||
case *types.Named:
|
||||
obj := u.Obj()
|
||||
// For resource types, simply emit an ID, since that is what will have been serialized.
|
||||
|
|
Loading…
Reference in a new issue