Co-authored-by: Lily Delalande <ldelalande@squareup.com>
This commit is contained in:
Wendy Tang
2025-06-25 16:18:48 -07:00
committed by GitHub
parent c3acddc360
commit d9d7eb0697
17 changed files with 1709 additions and 84 deletions
+6 -6
View File
@@ -58,7 +58,7 @@ fn default_version() -> String {
/// parameters: None,
/// };
///
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Recipe {
// Required fields
#[serde(default = "default_version")]
@@ -98,7 +98,7 @@ pub struct Recipe {
pub sub_recipes: Option<Vec<SubRecipe>>, // sub-recipes for the recipe
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Author {
#[serde(skip_serializing_if = "Option::is_none")]
pub contact: Option<String>, // creator/contact information of the recipe
@@ -107,7 +107,7 @@ pub struct Author {
pub metadata: Option<String>, // any additional metadata for the author
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Settings {
#[serde(skip_serializing_if = "Option::is_none")]
pub goose_provider: Option<String>,
@@ -152,7 +152,7 @@ where
}
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "snake_case")]
pub enum RecipeParameterRequirement {
Required,
@@ -170,7 +170,7 @@ impl fmt::Display for RecipeParameterRequirement {
}
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "snake_case")]
pub enum RecipeParameterInputType {
String,
@@ -190,7 +190,7 @@ impl fmt::Display for RecipeParameterInputType {
}
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct RecipeParameter {
pub key: String,
pub input_type: RecipeParameterInputType,