-
Notifications
You must be signed in to change notification settings - Fork 0
Fix the fix #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the fix #28
Conversation
There was a problem hiding this 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
NutrimentsandNutrimentsEstimatedstructs 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.
| 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"` |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
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.
| 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"` |
| 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"` |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
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.
| 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"` |
No description provided.