openfoodfacts / search-a-licious

🍊🔎 A pluggable search service for large collections of objects (like Open Food Facts)
https://search.openfoodfacts.org
GNU Affero General Public License v3.0
7 stars 5 forks source link

Add product schema #3

Closed simonj2 closed 2 years ago

simonj2 commented 2 years ago

What

I feel a Product schema would simplify first + third party development. See this thread for more thoughts.

Rather than do a larger effort to standardize things, I thought it would make sense to create a schema for this new API. Hopefully we can add descriptions, etc over time.

As part of doing this, I modified the generation script, checked in the schema, added some validation, and tried to group the fields.

Since folks are on vacation, I'll merge this PR tomorrow even without approval (have confirmed with Stephane that this is okay), but please comment if you don't want that to happen.