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

bug: contentTopic naming not consistent in the store response where is's content_topic #2582

Closed
fbarbu15 opened this issue Apr 12, 2024 · 6 comments · Fixed by #2584, #2646 or #2709
Closed
Assignees
Labels
bug Something isn't working

Comments

@fbarbu15
Copy link
Contributor

Relay/filter/lightPush uses contentTopic
While store returns content_topic

@fbarbu15
Copy link
Contributor Author

Bug was reintroduced by #2431

@fbarbu15 fbarbu15 reopened this Apr 26, 2024
@SionoiS
Copy link
Contributor

SionoiS commented Apr 26, 2024

:| sorry

@fbarbu15
Copy link
Contributor Author

I think there is a confusion here.
Relay returns contentTopic and store returned content_topic until it got fixed by #2584 to return also contentTopic
Now we are back to how it was at the beginning with relay returning contentTopic and store returning content_topic
Ex:

curl -v -X GET "http://127.0.0.1:51443/store/v1/messages?pubsubTopic=%2Fwaku%2F2%2Frs%2F0%2F0&pageSize=5&ascending=true" -H "Content-Type: application/json" -d 'None'
{"messages":[{"payload":"U3RvcmUgd29ya3MhIQ==","content_topic":"/myapp/1/latest/proto","version":0,"timestamp":1714466247670932480,"ephemeral":false}]}


curl -v -X GET "http://127.0.0.1:51443/relay/v1/messages/%2Fwaku%2F2%2Frs%2F0%2F0" -H "Content-Type: application/json" -d 'None'
[{"payload":"U3RvcmUgd29ya3MhIQ==","contentTopic":"/myapp/1/latest/proto","version":0,"timestamp":1714466247670932480,"ephemeral":false}]

@fbarbu15 fbarbu15 reopened this Apr 30, 2024
@Ivansete-status
Copy link
Collaborator

I think there is a confusion here. Relay returns contentTopic and store returned content_topic until it got fixed by #2584 to return also contentTopic Now we are back to how it was at the beginning with relay returning contentTopic and store returning content_topic Ex:

curl -v -X GET "http://127.0.0.1:51443/store/v1/messages?pubsubTopic=%2Fwaku%2F2%2Frs%2F0%2F0&pageSize=5&ascending=true" -H "Content-Type: application/json" -d 'None'
{"messages":[{"payload":"U3RvcmUgd29ya3MhIQ==","content_topic":"/myapp/1/latest/proto","version":0,"timestamp":1714466247670932480,"ephemeral":false}]}


curl -v -X GET "http://127.0.0.1:51443/relay/v1/messages/%2Fwaku%2F2%2Frs%2F0%2F0" -H "Content-Type: application/json" -d 'None'
[{"payload":"U3RvcmUgd29ya3MhIQ==","contentTopic":"/myapp/1/latest/proto","version":0,"timestamp":1714466247670932480,"ephemeral":false}]

Morning @fbarbu15 !
Sorry for the confusion! How do you need it to be returned in all cases? Snake case or CamelCase?
Cheers

@fbarbu15
Copy link
Contributor Author

fbarbu15 commented May 7, 2024

Hey, either way is fine with me. The important thing is to be consistent with other fields and across endpoints(ex relay and store responses)

@Ivansete-status
Copy link
Collaborator

Hey @fbarbu15 !
Thanks for submitting this issue. We've standardized all fields to CamelCase and is now available in nwaku-master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment