diff options
Diffstat (limited to 'crates/rocie-client/src/models/recipe_stub.rs')
| -rw-r--r-- | crates/rocie-client/src/models/recipe_stub.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/crates/rocie-client/src/models/recipe_stub.rs b/crates/rocie-client/src/models/recipe_stub.rs index 205faa6..803c8dd 100644 --- a/crates/rocie-client/src/models/recipe_stub.rs +++ b/crates/rocie-client/src/models/recipe_stub.rs @@ -16,13 +16,21 @@ pub struct RecipeStub { /// The content of this recipe, in cooklang format #[serde(rename = "content")] pub content: String, - /// The path the recipe should have - #[serde(rename = "path")] - pub path: String, + /// The globally unique name of this recipe + #[serde(rename = "name")] + pub name: String, + /// The optional parent of this recipe. + #[serde(rename = "parent", skip_serializing_if = "Option::is_none")] + pub parent: Option<models::RecipeParentId>, } impl RecipeStub { - pub fn new(content: String, path: String) -> RecipeStub { - RecipeStub { content, path } + pub fn new(content: String, name: String) -> RecipeStub { + RecipeStub { + content, + name, + parent: None, + } } } + |
