Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec.yaml or README.md out of date #103

Open
kmilodenisglez opened this issue Feb 9, 2023 · 8 comments
Open

spec.yaml or README.md out of date #103

kmilodenisglez opened this issue Feb 9, 2023 · 8 comments

Comments

@kmilodenisglez
Copy link
Contributor

kmilodenisglez commented Feb 9, 2023

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 kmilodenisglez changed the title spec.yaml out of date spec.yaml or README.md out of date Feb 9, 2023
@nguyer
Copy link
Contributor

nguyer commented Feb 9, 2023

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

@kmilodenisglez
Copy link
Contributor Author

kmilodenisglez commented Feb 9, 2023

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

@nguyer
Copy link
Contributor

nguyer commented Feb 9, 2023

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

@kmilodenisglez
Copy link
Contributor Author

kmilodenisglez commented Feb 9, 2023

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
Copy link
Contributor Author

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

@nguyer
Copy link
Contributor

nguyer commented Feb 9, 2023

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.

@kmilodenisglez
Copy link
Contributor Author

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
Copy link
Contributor Author

pull-request: #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants