firefly-fabconnect icon indicating copy to clipboard operation
firefly-fabconnect copied to clipboard

spec.yaml or README.md out of date

Open kmilodenisglez opened this issue 2 years ago • 8 comments

Hi @nguyer, @jimthematrix

The "payloadType" property of the "SubscriptionInfo" structure in internal/events/api/event.go accepts the data types "bytes", "string" or "stringifiedJSON/json".

or is the README.md the one that is not updated?

But in the spec.yaml only "json" and "string" are accepted.

image

kmilodenisglez avatar Feb 09 '23 16:02 kmilodenisglez

I think this is correct. In this case "bytes" are passed in as a string encded as hex or base64.

nguyer avatar Feb 09 '23 17:02 nguyer

I think this is correct. In this case "bytes" are passed in as a string encded as hex or base64.

so it is that the README.md should be updated, right?

Because an example in the readme uses the "stringifiedJSON" value for the "payloadType" property, at https://github.com/hyperledger/firefly-fabconnect#json-data-support-in-events

kmilodenisglez avatar Feb 09 '23 20:02 kmilodenisglez

Sorry I'm not understanding or seeing anything that is not correct here. "Stringified JSON" is just a string so it's still valid.

nguyer avatar Feb 09 '23 20:02 nguyer

Sorry I'm not understanding or seeing anything that is not correct here. "Stringified JSON" is just a string so it's still valid.

when I put the value "stringifiedJSON" to the property "payloadType", this is the response that the endpoint "http://localhost:3000/subscriptions" returns:

image

image

kmilodenisglez avatar Feb 09 '23 23:02 kmilodenisglez

It only lets me pass the values "string" or "json"

kmilodenisglez avatar Feb 09 '23 23:02 kmilodenisglez

Ah okay, I get it. Sorry I was slow to understand this one! I think the readme can be changed to just say "string" there instead.

nguyer avatar Feb 09 '23 23:02 nguyer

Ah okay, I get it. Sorry I was slow to understand this one! I think the readme can be changed to just say "string" there instead.

Exactly, sorry if I didn't explain well. My English is not very good

kmilodenisglez avatar Feb 09 '23 23:02 kmilodenisglez

pull-request: https://github.com/hyperledger/firefly-fabconnect/pull/104

kmilodenisglez avatar Feb 10 '23 16:02 kmilodenisglez