openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
652 stars 381 forks source link

Add a new binary property to some preferences, like allergens #9370

Closed stephanegigandet closed 2 weeks ago

stephanegigandet commented 11 months ago

We currently use 4 levels for all food preferences, but some preferences like allergens could have a single binary switch.

We should define a new property in https://world.openfoodfacts.org/api/v0/attribute_groups to indicate which properties should/could be binary.

Part of

alexgarel commented 3 weeks ago

We will add an attribute "binary" that says what are the values corresponding to on / off

eg: "binary": {"on": "important", "off": "not important"}.