Skip to content

Commit 73d4cbf

Browse files
committed
update config schema for output
1 parent 499d554 commit 73d4cbf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

dsc_lib/src/configure/config_doc.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ pub struct Metadata {
105105
pub other: Map<String, Value>,
106106
}
107107

108+
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
109+
#[serde(rename_all = "camelCase")]
110+
pub enum ValueOrCopy {
111+
Value(String),
112+
Copy(Copy),
113+
}
114+
115+
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
116+
#[serde(deny_unknown_fields)]
117+
pub struct Output {
118+
pub condition: Option<String>,
119+
pub r#type: DataType,
120+
pub value_or_copy: ValueOrCopy,
121+
}
122+
108123
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
109124
#[serde(deny_unknown_fields)]
110125
pub struct Configuration {
@@ -120,9 +135,12 @@ pub struct Configuration {
120135
pub resources: Vec<Resource>,
121136
#[serde(skip_serializing_if = "Option::is_none")]
122137
pub metadata: Option<Metadata>,
138+
#[serde(skip_serializing_if = "Option::is_none")]
139+
pub outputs: Option<HashMap<String, Output>>,
123140
}
124141

125142
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
143+
#[serde(deny_unknown_fields)]
126144
pub struct Parameter {
127145
#[serde(rename = "type")]
128146
pub parameter_type: DataType,
@@ -300,6 +318,7 @@ impl Configuration {
300318
variables: None,
301319
resources: Vec::new(),
302320
metadata: None,
321+
outputs: None,
303322
}
304323
}
305324
}

0 commit comments

Comments
 (0)