Better handling of Nutriments
This commit is contained in:
13
Sources/OpenFoodFacts/Schemas/ProductResponse.swift
Normal file
13
Sources/OpenFoodFacts/Schemas/ProductResponse.swift
Normal file
@@ -0,0 +1,13 @@
|
||||
public struct ProductResponse: Codable, ObjectDebugger {
|
||||
public var product: Product?
|
||||
public var code: String?
|
||||
public var status: Int? // or Bool, depending on your needs
|
||||
public var statusVerbose: String?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case product
|
||||
case code
|
||||
case status
|
||||
case statusVerbose = "status_verbose"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user