fix api definitions
This commit is contained in:
parent
73431bf2a7
commit
1f723861f1
@ -24,7 +24,7 @@ pub struct IngredientFood {
|
||||
#[serde(rename = "recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe: Option<Option<Box<crate::models::FoodRecipe>>>,
|
||||
#[serde(rename = "food_onhand", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub food_onhand: Option<Option<String>>,
|
||||
pub food_onhand: Option<Option<bool>>,
|
||||
#[serde(rename = "supermarket_category", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub supermarket_category: Option<Option<Box<crate::models::FoodSupermarketCategory>>>,
|
||||
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
|
||||
@ -44,7 +44,7 @@ pub struct IngredientFood {
|
||||
#[serde(rename = "substitute_children", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_children: Option<bool>,
|
||||
#[serde(rename = "substitute_onhand", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_onhand: Option<String>,
|
||||
pub substitute_onhand: Option<bool>,
|
||||
#[serde(rename = "child_inherit_fields", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub child_inherit_fields: Option<Option<Vec<crate::models::FoodInheritFieldsInner>>>,
|
||||
}
|
||||
|
@ -24,13 +24,13 @@ pub struct ShoppingListEntriesInnerRecipeMealplan {
|
||||
#[serde(rename = "mealplan", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan: Option<Option<i32>>,
|
||||
#[serde(rename = "servings")]
|
||||
pub servings: String,
|
||||
pub servings: f32,
|
||||
#[serde(rename = "mealplan_note", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan_note: Option<String>,
|
||||
}
|
||||
|
||||
impl ShoppingListEntriesInnerRecipeMealplan {
|
||||
pub fn new(servings: String) -> ShoppingListEntriesInnerRecipeMealplan {
|
||||
pub fn new(servings: f32) -> ShoppingListEntriesInnerRecipeMealplan {
|
||||
ShoppingListEntriesInnerRecipeMealplan {
|
||||
id: None,
|
||||
recipe_name: None,
|
||||
|
@ -26,7 +26,7 @@ pub struct ShoppingListEntry {
|
||||
#[serde(rename = "ingredient_note", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredient_note: Option<String>,
|
||||
#[serde(rename = "amount")]
|
||||
pub amount: String,
|
||||
pub amount: f32,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "checked", skip_serializing_if = "Option::is_none")]
|
||||
@ -44,7 +44,7 @@ pub struct ShoppingListEntry {
|
||||
}
|
||||
|
||||
impl ShoppingListEntry {
|
||||
pub fn new(food: Option<crate::models::IngredientFood>, amount: String) -> ShoppingListEntry {
|
||||
pub fn new(food: Option<crate::models::IngredientFood>, amount: f32) -> ShoppingListEntry {
|
||||
ShoppingListEntry {
|
||||
id: None,
|
||||
list_recipe: None,
|
||||
|
Loading…
Reference in New Issue
Block a user