You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Google Cloud Retail: updateMask values must be snake_case despite being camelCase on the Product Interface #4195
Hey everyone, I was using this package and found some struggles and thought about a suggestion to the documentation around the ProductService methods on Google Cloud Retail.
Basically, there's an interface called IProduct that represents a product on Cloud Retail Service (CRS) that has all its properties in camelCase. The issue is, when you want to partially update a product, you need to specify in a property called updateMaskan array of strings that represents the properties to be updated and they MUST be in snake_case and not on camelCase like in the product interface.
This is what I needed to send on the updateProduct method to have a successful request
And in the documentation, there's no reference to this difference.
Plus, another struggled I got was, to using updateProduct, getProduct, the property name is the full path (with location+catalog + branch+product) and not the product name. For the importProducts there's a parent proper for this but it's better documented on what should be value.
Hope it helps other people in the future that face the same issue :D
Thank you so much for noticing this and for the quick move with the issue!
Just another note, I didn't know this repo existed with samples as I was using an old one. Is it possible to add to this Google Cloud Node one any reference to those samples in the README, please? There're not many answers on stackoverflow or much info about the client on the official website so any documentation/examples will help everyone.
Activity
sofisl commentedon Apr 27, 2023
Hey @PedroS11, I will open an issue here: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/main/retail.
The sample you linked is autogenerated, and isn't guaranteed to work. However, the handwritten samples should contain this detail.
Thank you for submitting this issue!
PedroS11 commentedon Apr 27, 2023
Thank you so much for noticing this and for the quick move with the issue!
Just another note, I didn't know this repo existed with samples as I was using an old one. Is it possible to add to this Google Cloud Node one any reference to those samples in the README, please? There're not many answers on stackoverflow or much info about the client on the official website so any documentation/examples will help everyone.
Thank you !!!