Skip to content
Open
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
2 changes: 1 addition & 1 deletion Sources/Model/OFF/ProductConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public struct ProductQueryConfiguration {
var languages: [OpenFoodFactsLanguage]
var fields: [ProductField]?

init(barcode: String,
public init(barcode: String,
languages: [OpenFoodFactsLanguage] = [],
country: OpenFoodFactsCountry? = nil,
fields: [ProductField]? = nil) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Model/OFF/ProductField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

enum ProductField: String {
public enum ProductField: String {
Copy link
Preview

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

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

[nitpick] Making the entire ProductField enum public exposes all its cases to consumers. Consider whether all cases should be public or if only specific cases need to be accessible externally.

Copilot uses AI. Check for mistakes.

case barcode = "code"
case name = "product_name"
case nameInLanguages = "product_name_"
Expand Down
6 changes: 3 additions & 3 deletions Sources/Model/OFF/ProductResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public struct ProductResponse: Decodable {
/// Possible value for [result.id]: product not found
static let resultProductNotFound = "product_not_found"

let barcode: String?
let status: String?
let product: Product?
public let barcode: String?
public let status: String?
public let product: Product?

enum CodingKeys: String, CodingKey {
case barcode = "code"
Expand Down
Loading