Skip to content

Commit 384c6fe

Browse files
committed
update config schema for output
1 parent f7e6e82 commit 384c6fe

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/dsc-lib/src/configure/config_doc.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,21 @@ pub struct UserFunctionOutput {
129129
pub value: String,
130130
}
131131

132+
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
133+
#[serde(untagged)]
134+
pub enum ValueOrCopy {
135+
Value(String),
136+
Copy(Copy),
137+
}
138+
139+
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
140+
#[serde(deny_unknown_fields)]
141+
pub struct Output {
142+
pub condition: Option<String>,
143+
pub r#type: DataType,
144+
pub value_or_copy: ValueOrCopy,
145+
}
146+
132147
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
133148
#[serde(deny_unknown_fields)]
134149
pub struct Configuration {
@@ -146,9 +161,12 @@ pub struct Configuration {
146161
pub resources: Vec<Resource>,
147162
#[serde(skip_serializing_if = "Option::is_none")]
148163
pub metadata: Option<Metadata>,
164+
#[serde(skip_serializing_if = "Option::is_none")]
165+
pub outputs: Option<HashMap<String, Output>>,
149166
}
150167

151168
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
169+
#[serde(deny_unknown_fields)]
152170
pub struct Parameter {
153171
#[serde(rename = "type")]
154172
pub parameter_type: DataType,
@@ -358,6 +376,7 @@ impl Configuration {
358376
resources: Vec::new(),
359377
functions: None,
360378
variables: None,
379+
outputs: None,
361380
}
362381
}
363382
}

0 commit comments

Comments
 (0)