Skip to content

Conversation

@LightJack05
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds five new nutrient-related fields to the Product struct and its corresponding API documentation. The changes support additional nutritional data tracking for products.

Changes:

  • Added five new nutrient fields to both Nutriments and NutrimentsEstimated structs in the Product model
  • Updated Swagger/OpenAPI documentation (YAML and JSON) to reflect the new fields
  • Updated generated documentation code to include the new fields

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
internal/database/product/product.go Added 5 new fields (FruitsVegetablesLegumesEstimateFromIngredients100g, Galactose_100g, NovaGroup, Phylloquinone_100g, Water_100g) to both Nutriments and NutrimentsEstimated structs
docs/swagger.yaml Added the same 5 fields to both nutriments and nutriments_estimated schema definitions in alphabetical order
docs/swagger.json Added the same 5 fields to both nutriments and nutriments_estimated schema definitions in alphabetical order
docs/docs.go Updated generated documentation template to include the 5 new fields in both schema definitions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +193 to +196
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"`
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.
Comment on lines +383 to +386
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"`
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.
@LightJack05 LightJack05 merged commit ec1f8f9 into main Feb 5, 2026
12 checks passed
@LightJack05 LightJack05 deleted the fix-the-fix branch February 5, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants