feat(Products): new 'quantity' field (synced with OFF)#1114
feat(Products): new 'quantity' field (synced with OFF)#1114
Conversation
c76e387 to
c168ade
Compare
monsieurtanuki
left a comment
There was a problem hiding this comment.
@raphodn I've just created openfoodfacts/openfoodfacts-dart#1158
I was thinking, could retrieving OFF data be optional? Or maybe we could provide a list of product fields? Less computation, lighter payload, avoiding undesired crashes when unwanted fields change formats?
You mean clients choosing what they want to receive from the API ? I'm not even sure how to do this simply. adding a new field will also break the mobile ? |
Exactly
Something like
Could work too.
No, I don't care. Anyway, I'm about to code something more resilient, where we don't un-json ALL fields by default, but only "just-in-time" for each field - which may mean never for some fields. |
What
New
Product.quantityfieldSimilarly to other fields on this model, we sync the data with OFF.
Why
The raw info could be used to
product_quantity&product_quantity_unitfields