USDA / USDA-APIs

Do you have feedback, ideas, or questions for USDA APIs? Use this repository's Issue Tracker to join the discussion.
www.usda.gov/developer
107 stars 16 forks source link

FoodNutrient.nutrient structure has changed overnight #105

Open andreivladmatei opened 3 years ago

andreivladmatei commented 3 years ago

It seams that the structure of FoodNutrient.nutrient has changed overnight from having a string "unitName" field to having a new structure named "nutrientUnit".

Is this intentional? This kind of change affects our products :/

Is it possible to get emails with notices of structure changes in the future?

kellyjonbrazil commented 3 years ago

This happened to me, too. Had to update my code to look for NutrientUnit in both places as a workaround. Changing API structure is not cool without notice and should probably only be done with proper versioning of the API.

hphungnal commented 3 years ago

@andreimateiro @kellyjonbrazil There was a new release of FDC with a components (nutrient) search on the UI. However, the API should not have changed so this was something that was not caught. Apologies for the inconvenience. I will let the devs know so this is fixed ASAP. Will let you know of when the fix will be deployed so you can revert.

hphungnal commented 3 years ago

@andreimateiro @kellyjonbrazil We will be deploying the fix for this issue at 21:00 UTC (4pm EST) today. The fix should address this issue with nutrient.unitName (it will be a string again) and also another issue where labelNutrients for Branded foods were being returned as empty. Thanks!

boloni225 commented 3 years ago

@andreimateiro @kellyjonbrazil We will be deploying the fix for this issue at 21:00 UTC (4pm EST) today. The fix should address this issue with nutrient.unitName (it will be a string again) and also another issue where labelNutrients for Branded foods were being returned as empty. Thanks!

Thanks for the quick fix I appreciate it :). Next time it would also be great if you could send out an email to everyone using the API. My app was down for a few days as well.