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
660 stars 389 forks source link

OpenAPI definition doesn't reflect correctly some packaging fields returned by API #10989

Open void0x23 opened 2 weeks ago

void0x23 commented 2 weeks ago

This issue is related to a coherence problem i've found in the openapi specification, in particular the packaging section, where we can see that the elements are described with 2 fields, id and lc_name.

Image

but they seems to be returned as a single string

Image

and this create problems during the automatic generation of classes in the code.

Should we change the definition to String instead ?

void0x23 commented 2 weeks ago

Also, in the api reference related to the knowledge_panels, the definition of the field action_element is String

Image but seems to be returned as an object Image and this creates deserialization problems