Skip to content

Commit

Permalink
Merge pull request #2 from chompfoods/SWAGGERHUB
Browse files Browse the repository at this point in the history
Swaggerhub
  • Loading branch information
chompfoods authored Jan 31, 2020
2 parents 0e0da51 + 6e3f945 commit 93ce5ad
Show file tree
Hide file tree
Showing 14 changed files with 500 additions and 1,347 deletions.
1,529 changes: 376 additions & 1,153 deletions SwaggerClient/Classes/Swaggers/APIs/DefaultAPI.swift

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

/** Please read the description of each field in this API response object example. By default, the value of each field is __null__. This indicates an unknown state or that no data exists. */
/** Please read the description of each field in this API response object example. By default, the value of each field is **null**. This indicates an unknown state or that no data exists. */
public struct BrandedFoodObject: Codable {


Expand Down
39 changes: 8 additions & 31 deletions SwaggerClient/Classes/Swaggers/Models/BrandedFoodObjectItems.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct BrandedFoodObjectItems: Codable {
/** The brand name that owns this item */
public var brand: String?

/** Ingredients in order of highest value to least */
/** This food item's ingredients from greatest quantity to least */
public var ingredients: String?

public var package: BrandedFoodObjectPackage?
Expand All @@ -29,12 +29,8 @@ public struct BrandedFoodObjectItems: Codable {

public var categories: [String]?

public var nutrients: BrandedFoodObjectNutrients?

public var calorieConversionFactor: BrandedFoodObjectCalorieConversionFactor?

/** The multiplication factor used to calculate protein from nitrogen */
public var proteinConversionFactor: BigDecimal?
/** An array containing nutrient informatio objects for this food item */
public var nutrients: [BrandedFoodObjectNutrients]?

public var dietLabels: BrandedFoodObjectDietLabels?

Expand All @@ -43,12 +39,6 @@ public struct BrandedFoodObjectItems: Codable {

public var packagingPhotos: BrandedFoodObjectPackagingPhotos?

/** An array of objects containing the constituent parts of a food (e.g. bone is a component of meat) */
public var components: [BrandedFoodObjectComponents]?

/** An array of objects containing information on discrete amounts of a food found in this item */
public var portions: [BrandedFoodObjectPortions]?

/** An array of ingredients in this item that may cause allergic reactions in people */
public var allergens: [String]?

Expand All @@ -75,18 +65,15 @@ public struct BrandedFoodObjectItems: Codable {
/** An array of trace ingredients that may be found in this item */
public var traces: [String]?

/** Common names associated with this item. These generally clarify what the item is (e.g. when the brand name is \"BRAND's Spicy Enchilada\" the common name may be \"Chicken enchilada\") */
public var commonName: String?
/** An array of vitamins that are found in this item */
public var vitamins: [String]?

/** A description of this item */
public var _description: String?

/** An array of keywords that can be used to describe this item */
public var keywords: [String]?

/** Comments on any unusual aspects of this item. Examples might include unusual aspects of the food overall. */
public var footnote: String?
public init(barcode: String? = nil, name: String? = nil, brand: String? = nil, ingredients: String? = nil, package: BrandedFoodObjectPackage? = nil, serving: BrandedFoodObjectServing? = nil, categories: [String]? = nil, nutrients: BrandedFoodObjectNutrients? = nil, calorieConversionFactor: BrandedFoodObjectCalorieConversionFactor? = nil, proteinConversionFactor: BigDecimal? = nil, dietLabels: BrandedFoodObjectDietLabels? = nil, dietFlags: [BrandedFoodObjectDietFlags]? = nil, packagingPhotos: BrandedFoodObjectPackagingPhotos? = nil, components: [BrandedFoodObjectComponents]? = nil, portions: [BrandedFoodObjectPortions]? = nil, allergens: [String]? = nil, brandList: [String]? = nil, countries: [String]? = nil, countryDetails: BrandedFoodObjectCountryDetails? = nil, palmOilIngredients: [String]? = nil, ingredientList: [String]? = nil, hasEnglishIngredients: Bool? = nil, minerals: [String]? = nil, traces: [String]? = nil, commonName: String? = nil, _description: String? = nil, keywords: [String]? = nil, footnote: String? = nil) {
public init(barcode: String? = nil, name: String? = nil, brand: String? = nil, ingredients: String? = nil, package: BrandedFoodObjectPackage? = nil, serving: BrandedFoodObjectServing? = nil, categories: [String]? = nil, nutrients: [BrandedFoodObjectNutrients]? = nil, dietLabels: BrandedFoodObjectDietLabels? = nil, dietFlags: [BrandedFoodObjectDietFlags]? = nil, packagingPhotos: BrandedFoodObjectPackagingPhotos? = nil, allergens: [String]? = nil, brandList: [String]? = nil, countries: [String]? = nil, countryDetails: BrandedFoodObjectCountryDetails? = nil, palmOilIngredients: [String]? = nil, ingredientList: [String]? = nil, hasEnglishIngredients: Bool? = nil, minerals: [String]? = nil, traces: [String]? = nil, vitamins: [String]? = nil, _description: String? = nil, keywords: [String]? = nil) {
self.barcode = barcode
self.name = name
self.brand = brand
Expand All @@ -95,13 +82,9 @@ public struct BrandedFoodObjectItems: Codable {
self.serving = serving
self.categories = categories
self.nutrients = nutrients
self.calorieConversionFactor = calorieConversionFactor
self.proteinConversionFactor = proteinConversionFactor
self.dietLabels = dietLabels
self.dietFlags = dietFlags
self.packagingPhotos = packagingPhotos
self.components = components
self.portions = portions
self.allergens = allergens
self.brandList = brandList
self.countries = countries
Expand All @@ -111,10 +94,9 @@ public struct BrandedFoodObjectItems: Codable {
self.hasEnglishIngredients = hasEnglishIngredients
self.minerals = minerals
self.traces = traces
self.commonName = commonName
self.vitamins = vitamins
self._description = _description
self.keywords = keywords
self.footnote = footnote
}
public enum CodingKeys: String, CodingKey {
case barcode
Expand All @@ -125,13 +107,9 @@ public struct BrandedFoodObjectItems: Codable {
case serving
case categories
case nutrients
case calorieConversionFactor = "calorie_conversion_factor"
case proteinConversionFactor = "protein_conversion_factor"
case dietLabels = "diet_labels"
case dietFlags = "diet_flags"
case packagingPhotos = "packaging_photos"
case components
case portions
case allergens
case brandList = "brand_list"
case countries
Expand All @@ -141,10 +119,9 @@ public struct BrandedFoodObjectItems: Codable {
case hasEnglishIngredients = "has_english_ingredients"
case minerals
case traces
case commonName = "common_name"
case vitamins
case _description = "description"
case keywords
case footnote
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,42 @@

import Foundation

/** An object containing nutrient information from multiple sources */
/** An object containing information for a specific nutrient found in this food item */
public struct BrandedFoodObjectNutrients: Codable {


/** An array containing an object for each nutrient data point */
public var chomp: [BrandedFoodObjectNutrientsChomp]?
/** Nutrient name */
public var name: String?

/** An array containing an object for each nutrient data point as found in the USDA database */
public var usda: [BrandedFoodObjectNutrientsUsda]?
public init(chomp: [BrandedFoodObjectNutrientsChomp]? = nil, usda: [BrandedFoodObjectNutrientsUsda]? = nil) {
self.chomp = chomp
self.usda = usda
/** Amount of the nutrient per 100g of food */
public var per100g: BigDecimal?

/** The unit used for the measure of this nutrient */
public var measurementUnit: String?

/** Nutrient rank */
public var rank: Int?

/** Number of observations on which the value is based */
public var dataPoints: Int?

/** Description of the nutrient source */
public var _description: String?
public init(name: String? = nil, per100g: BigDecimal? = nil, measurementUnit: String? = nil, rank: Int? = nil, dataPoints: Int? = nil, _description: String? = nil) {
self.name = name
self.per100g = per100g
self.measurementUnit = measurementUnit
self.rank = rank
self.dataPoints = dataPoints
self._description = _description
}
public enum CodingKeys: String, CodingKey {
case name
case per100g = "per_100g"
case measurementUnit = "measurement_unit"
case rank
case dataPoints = "data_points"
case _description = "description"
}

}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public struct BrandedFoodObjectPackage: Codable {
public var quantity: Int?

/** Package size */
public var size: Int?
public init(quantity: Int? = nil, size: Int? = nil) {
public var size: String?
public init(quantity: Int? = nil, size: String? = nil) {
self.quantity = quantity
self.size = size
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,22 @@ public struct BrandedFoodObjectServing: Codable {


/** Serving size */
public var size: Int?
public var size: String?

/** Serving measurement unit (e.g. if measure is 3 tsp, the unit is tsp) */
/** Measurement unit for each serving (e.g. if measure is 3 tsp, the unit is tsp) */
public var measurementUnit: String?

/** Serving size description */
public var sizeFulltext: String?

/** Total servings */
public var total: Int?
public init(size: Int? = nil, measurementUnit: String? = nil, sizeFulltext: String? = nil, total: Int? = nil) {
public init(size: String? = nil, measurementUnit: String? = nil, sizeFulltext: String? = nil) {
self.size = size
self.measurementUnit = measurementUnit
self.sizeFulltext = sizeFulltext
self.total = total
}
public enum CodingKeys: String, CodingKey {
case size
case measurementUnit = "measurement_unit"
case sizeFulltext = "size_fulltext"
case total
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

/** Please read the description of each field in this API response object example. By default, the value of each field is __null__. This indicates an unknown state or that no data exists. */
/** Please read the description of each field in this API response object example. By default, the value of each field is **null**. This indicates an unknown state or that no data exists. */
public struct IngredientObject: Codable {


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// BrandedFoodObjectCalorieConversionFactor.swift
// IngredientObjectCalorieConversionFactor.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
Expand All @@ -8,7 +8,7 @@
import Foundation

/** An object containing the multiplication factors to be used when calculating energy from macronutrients for a specific food. */
public struct BrandedFoodObjectCalorieConversionFactor: Codable {
public struct IngredientObjectCalorieConversionFactor: Codable {


/** The multiplication factor for protein */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// BrandedFoodObjectComponents.swift
// IngredientObjectComponents.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
Expand All @@ -8,7 +8,7 @@
import Foundation

/** An object containing information on a specific component of this food item */
public struct BrandedFoodObjectComponents: Codable {
public struct IngredientObjectComponents: Codable {


/** The kind of component, e.g. bone */
Expand Down
Loading

0 comments on commit 93ce5ad

Please sign in to comment.