hyperledger / firefly-fabconnect

REST API to interact with a Fabric network and event streaming via websocket
Apache License 2.0
36 stars 29 forks source link

Parameter handling is inconsistent #114

Open Tillaert opened 1 year ago

Tillaert commented 1 year ago

Currently, parameters that are objects are not encoded as strings, however, arrays are.

Object parameter: https://github.com/hyperledger/firefly-fabconnect/blob/main/internal/rest/utils/params_test.go#L91 Array parameter: https://github.com/hyperledger/firefly-fabconnect/blob/main/internal/rest/utils/params_test.go#L306

This is not consistent, and begs the question how to pass objects with nested arrays and arrays of objects.

Tests are missing for objectArray.

Firefly is sending objects encoded as strings, and this results in errors, see:

https://github.com/hyperledger/firefly/issues/1307

Tillaert commented 1 year ago

@DerekJarvis You have more insight into this?

DerekJarvis commented 1 year ago

@DerekJarvis You have more insight into this?

Sorry - haven't worked with Firefly for some time. I did a PR that tried to improve some type handling, but overall it doesn't seem like a current focus of Firefly to handle the complex data types that Hyperledger Fabric supports.