Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,18 @@ const docTemplate = `{
"fructose_100g": {
"type": "number"
},
"fruits-vegetables-legumes-estimate-from-ingredients_100g": {
"type": "number"
},
"fruits-vegetables-nuts": {
"type": "number"
},
"fruits-vegetables-nuts_100g": {
"type": "number"
},
"galactose_100g": {
"type": "number"
},
"gamma-linolenic-acid": {
"type": "number"
},
Expand Down Expand Up @@ -477,6 +483,9 @@ const docTemplate = `{
"nervonic-acid_100g": {
"type": "number"
},
"nova-group": {
"type": "number"
},
"nucleotides": {
"type": "number"
},
Expand Down Expand Up @@ -543,6 +552,9 @@ const docTemplate = `{
"phosphorus_100g": {
"type": "number"
},
"phylloquinone_100g": {
"type": "number"
},
"polyols": {
"type": "number"
},
Expand Down Expand Up @@ -699,6 +711,9 @@ const docTemplate = `{
"vitamin-pp_100g": {
"type": "number"
},
"water_100g": {
"type": "number"
},
"zinc": {
"type": "number"
},
Expand Down Expand Up @@ -902,12 +917,18 @@ const docTemplate = `{
"fructose_100g": {
"type": "number"
},
"fruits-vegetables-legumes-estimate-from-ingredients_100g": {
"type": "number"
},
"fruits-vegetables-nuts": {
"type": "number"
},
"fruits-vegetables-nuts_100g": {
"type": "number"
},
"galactose_100g": {
"type": "number"
},
"gamma-linolenic-acid": {
"type": "number"
},
Expand Down Expand Up @@ -1028,6 +1049,9 @@ const docTemplate = `{
"nervonic-acid_100g": {
"type": "number"
},
"nova-group": {
"type": "number"
},
"nucleotides": {
"type": "number"
},
Expand Down Expand Up @@ -1094,6 +1118,9 @@ const docTemplate = `{
"phosphorus_100g": {
"type": "number"
},
"phylloquinone_100g": {
"type": "number"
},
"polyols": {
"type": "number"
},
Expand Down Expand Up @@ -1250,6 +1277,9 @@ const docTemplate = `{
"vitamin-pp_100g": {
"type": "number"
},
"water_100g": {
"type": "number"
},
"zinc": {
"type": "number"
},
Expand Down
30 changes: 30 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,18 @@
"fructose_100g": {
"type": "number"
},
"fruits-vegetables-legumes-estimate-from-ingredients_100g": {
"type": "number"
},
"fruits-vegetables-nuts": {
"type": "number"
},
"fruits-vegetables-nuts_100g": {
"type": "number"
},
"galactose_100g": {
"type": "number"
},
"gamma-linolenic-acid": {
"type": "number"
},
Expand Down Expand Up @@ -470,6 +476,9 @@
"nervonic-acid_100g": {
"type": "number"
},
"nova-group": {
"type": "number"
},
"nucleotides": {
"type": "number"
},
Expand Down Expand Up @@ -536,6 +545,9 @@
"phosphorus_100g": {
"type": "number"
},
"phylloquinone_100g": {
"type": "number"
},
"polyols": {
"type": "number"
},
Expand Down Expand Up @@ -692,6 +704,9 @@
"vitamin-pp_100g": {
"type": "number"
},
"water_100g": {
"type": "number"
},
"zinc": {
"type": "number"
},
Expand Down Expand Up @@ -895,12 +910,18 @@
"fructose_100g": {
"type": "number"
},
"fruits-vegetables-legumes-estimate-from-ingredients_100g": {
"type": "number"
},
"fruits-vegetables-nuts": {
"type": "number"
},
"fruits-vegetables-nuts_100g": {
"type": "number"
},
"galactose_100g": {
"type": "number"
},
"gamma-linolenic-acid": {
"type": "number"
},
Expand Down Expand Up @@ -1021,6 +1042,9 @@
"nervonic-acid_100g": {
"type": "number"
},
"nova-group": {
"type": "number"
},
"nucleotides": {
"type": "number"
},
Expand Down Expand Up @@ -1087,6 +1111,9 @@
"phosphorus_100g": {
"type": "number"
},
"phylloquinone_100g": {
"type": "number"
},
"polyols": {
"type": "number"
},
Expand Down Expand Up @@ -1243,6 +1270,9 @@
"vitamin-pp_100g": {
"type": "number"
},
"water_100g": {
"type": "number"
},
"zinc": {
"type": "number"
},
Expand Down
20 changes: 20 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,14 @@ definitions:
type: number
fructose_100g:
type: number
fruits-vegetables-legumes-estimate-from-ingredients_100g:
type: number
fruits-vegetables-nuts:
type: number
fruits-vegetables-nuts_100g:
type: number
galactose_100g:
type: number
gamma-linolenic-acid:
type: number
gamma-linolenic-acid_100g:
Expand Down Expand Up @@ -225,6 +229,8 @@ definitions:
type: number
nervonic-acid_100g:
type: number
nova-group:
type: number
nucleotides:
type: number
nucleotides_100g:
Expand Down Expand Up @@ -269,6 +275,8 @@ definitions:
type: number
phosphorus_100g:
type: number
phylloquinone_100g:
type: number
polyols:
type: number
polyols_100g:
Expand Down Expand Up @@ -373,6 +381,8 @@ definitions:
type: number
vitamin-pp_100g:
type: number
water_100g:
type: number
zinc:
type: number
zinc_100g:
Expand Down Expand Up @@ -508,10 +518,14 @@ definitions:
type: number
fructose_100g:
type: number
fruits-vegetables-legumes-estimate-from-ingredients_100g:
type: number
fruits-vegetables-nuts:
type: number
fruits-vegetables-nuts_100g:
type: number
galactose_100g:
type: number
gamma-linolenic-acid:
type: number
gamma-linolenic-acid_100g:
Expand Down Expand Up @@ -592,6 +606,8 @@ definitions:
type: number
nervonic-acid_100g:
type: number
nova-group:
type: number
nucleotides:
type: number
nucleotides_100g:
Expand Down Expand Up @@ -636,6 +652,8 @@ definitions:
type: number
phosphorus_100g:
type: number
phylloquinone_100g:
type: number
polyols:
type: number
polyols_100g:
Expand Down Expand Up @@ -740,6 +758,8 @@ definitions:
type: number
vitamin-pp_100g:
type: number
water_100g:
type: number
zinc:
type: number
zinc_100g:
Expand Down
12 changes: 12 additions & 0 deletions internal/database/product/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ type Product struct {
NutritionScoreFr float64 `json:"nutrition-score-fr" bson:"nutrition-score-fr"`
NutritionScoreUk100g float64 `json:"nutrition-score-uk_100g" bson:"nutrition-score-uk_100g"`
NutritionScoreUk float64 `json:"nutrition-score-uk" bson:"nutrition-score-uk"`

FruitsVegetablesLegumesEstimateFromIngredients100g float64 `json:"fruits-vegetables-legumes-estimate-from-ingredients_100g" bson:"fruits-vegetables-legumes-estimate-from-ingredients_100g,truncate"`
Galactose_100g float64 `json:"galactose_100g" bson:"galactose_100g"`
NovaGroup float64 `json:"nova-group" bson:"nova-group,truncate"`
Phylloquinone_100g float64 `json:"phylloquinone_100g" bson:"phylloquinone_100g"`
Water_100g float64 `json:"water_100g" bson:"water_100g"`
Comment on lines +193 to +196
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field names Galactose_100g, Phylloquinone_100g, and Water_100g violate the established naming convention. Throughout the codebase, all nutrient fields use CamelCase format without underscores (e.g., Fructose100g, Glucose100g, Maltose100g, Zinc100g). These fields should be renamed to Galactose100g, Phylloquinone100g, and Water100g respectively to maintain consistency.

Suggested change
Galactose_100g float64 `json:"galactose_100g" bson:"galactose_100g"`
NovaGroup float64 `json:"nova-group" bson:"nova-group,truncate"`
Phylloquinone_100g float64 `json:"phylloquinone_100g" bson:"phylloquinone_100g"`
Water_100g float64 `json:"water_100g" bson:"water_100g"`
Galactose100g float64 `json:"galactose_100g" bson:"galactose_100g"`
NovaGroup float64 `json:"nova-group" bson:"nova-group,truncate"`
Phylloquinone100g float64 `json:"phylloquinone_100g" bson:"phylloquinone_100g"`
Water100g float64 `json:"water_100g" bson:"water_100g"`

Copilot uses AI. Check for mistakes.
}
NutrimentsEstimated struct {
Energy100g float64 `json:"energy_100g" bson:"energy_100g"`
Expand Down Expand Up @@ -372,5 +378,11 @@ type Product struct {
NutritionScoreFr float64 `json:"nutrition-score-fr" bson:"nutrition-score-fr"`
NutritionScoreUk100g float64 `json:"nutrition-score-uk_100g" bson:"nutrition-score-uk_100g"`
NutritionScoreUk float64 `json:"nutrition-score-uk" bson:"nutrition-score-uk"`

FruitsVegetablesLegumesEstimateFromIngredients100g float64 `json:"fruits-vegetables-legumes-estimate-from-ingredients_100g" bson:"fruits-vegetables-legumes-estimate-from-ingredients_100g,truncate"`
Galactose_100g float64 `json:"galactose_100g" bson:"galactose_100g"`
NovaGroup float64 `json:"nova-group" bson:"nova-group,truncate"`
Phylloquinone_100g float64 `json:"phylloquinone_100g" bson:"phylloquinone_100g"`
Water_100g float64 `json:"water_100g" bson:"water_100g"`
Comment on lines +383 to +386
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field names Galactose_100g, Phylloquinone_100g, and Water_100g violate the established naming convention. Throughout the codebase, all nutrient fields use CamelCase format without underscores (e.g., Fructose100g, Glucose100g, Maltose100g, Zinc100g). These fields should be renamed to Galactose100g, Phylloquinone100g, and Water100g respectively to maintain consistency.

Suggested change
Galactose_100g float64 `json:"galactose_100g" bson:"galactose_100g"`
NovaGroup float64 `json:"nova-group" bson:"nova-group,truncate"`
Phylloquinone_100g float64 `json:"phylloquinone_100g" bson:"phylloquinone_100g"`
Water_100g float64 `json:"water_100g" bson:"water_100g"`
Galactose100g float64 `json:"galactose_100g" bson:"galactose_100g"`
NovaGroup float64 `json:"nova-group" bson:"nova-group,truncate"`
Phylloquinone100g float64 `json:"phylloquinone_100g" bson:"phylloquinone_100g"`
Water100g float64 `json:"water_100g" bson:"water_100g"`

Copilot uses AI. Check for mistakes.
} `json:"nutriments_estimated" bson:"nutriments_estimated"`
}
Loading