Skip to content

Commit a7ae548

Browse files
committed
rename enum values to match JSON
1 parent 1ca38fe commit a7ae548

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dsc/src/resolve.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ pub enum IncludeKind {
1818
/// and not allowed to reference parent directories. If a configuration document is used
1919
/// instead of a file, then the path is relative to the current working directory.
2020
#[serde(rename = "configurationFile")]
21-
FilePath(String),
21+
ConfigurationFile(String),
2222
#[serde(rename = "configurationContent")]
23-
Content(String),
23+
ConfigurationContent(String),
2424
}
2525

2626
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
2727
pub enum IncludeParametersKind {
2828
#[serde(rename = "parametersFile")]
29-
FilePath(String),
29+
ParametersFile(String),
3030
#[serde(rename = "parametersContent")]
31-
Content(String),
31+
ParametersContent(String),
3232
}
3333

3434
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
@@ -67,7 +67,7 @@ pub fn get_contents(input: &str) -> Result<(Option<String>, String), String> {
6767
};
6868

6969
let config_json = match include.configuration {
70-
IncludeKind::FilePath(file_path) => {
70+
IncludeKind::ConfigurationFile(file_path) => {
7171
let include_path = normalize_path(Path::new(&file_path))?;
7272

7373
// read the file specified in the Include input
@@ -100,7 +100,7 @@ pub fn get_contents(input: &str) -> Result<(Option<String>, String), String> {
100100
}
101101
}
102102
},
103-
IncludeKind::Content(text) => {
103+
IncludeKind::ConfigurationContent(text) => {
104104
match parse_input_to_json(&text) {
105105
Ok(json) => json,
106106
Err(err) => {
@@ -111,7 +111,7 @@ pub fn get_contents(input: &str) -> Result<(Option<String>, String), String> {
111111
};
112112

113113
let parameters = match include.parameters {
114-
Some(IncludeParametersKind::FilePath(file_path)) => {
114+
Some(IncludeParametersKind::ParametersFile(file_path)) => {
115115
// combine the path with DSC_CONFIG_ROOT
116116
let parameters_file = normalize_path(Path::new(&file_path))?;
117117
info!("{} '{parameters_file:?}'", t!("resolve.resolvingParameters"));
@@ -130,7 +130,7 @@ pub fn get_contents(input: &str) -> Result<(Option<String>, String), String> {
130130
}
131131
}
132132
},
133-
Some(IncludeParametersKind::Content(text)) => {
133+
Some(IncludeParametersKind::ParametersContent(text)) => {
134134
let parameters_json = match parse_input_to_json(&text) {
135135
Ok(json) => json,
136136
Err(err) => {

0 commit comments

Comments
 (0)