Skip to content

Commit

Permalink
Merge branch 'winpsadapter_fix' of https://github.com/anmenaga/DSC-New
Browse files Browse the repository at this point in the history
…into winpsadapter_fix
  • Loading branch information
anmenaga committed Jul 3, 2024
2 parents 0a53236 + c077f8c commit 0ba0fa9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion dsc_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ indicatif = { version = "0.17" }
jsonschema = "0.17"
num-traits = "0.2"
regex = "1.7"
reqwest = { version = "0.12", features = ["blocking"] }
schemars = { version = "0.8.12", features = ["preserve_order"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order"] }
Expand Down
7 changes: 0 additions & 7 deletions dsc_lib/src/dscerror.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use std::str::Utf8Error;

use indicatif::style::TemplateError;
use reqwest::StatusCode;
use thiserror::Error;
use tracing::error;
use tree_sitter::LanguageError;
Expand Down Expand Up @@ -32,12 +31,6 @@ pub enum DscError {
#[error("Function '{0}' error: {1}")]
FunctionArg(String, String),

#[error("HTTP: {0}")]
Http(#[from] reqwest::Error),

#[error("HTTP status: {0}")]
HttpStatus(StatusCode),

#[error("Function integer argument conversion error: {0}")]
IntegerConversion(#[from] std::num::ParseIntError),

Expand Down
11 changes: 0 additions & 11 deletions dsc_lib/src/dscresources/command_resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,17 +465,6 @@ pub fn get_schema(resource: &ResourceManifest, cwd: &str) -> Result<String, DscE
let json = serde_json::to_string(schema)?;
Ok(json)
},
SchemaKind::Url(ref url) => {
// TODO: cache downloaded schemas so we don't have to download them every time
let mut response = reqwest::blocking::get(url)?;
if !response.status().is_success() {
return Err(DscError::HttpStatus(response.status()));
}

let mut body = String::new();
response.read_to_string(&mut body)?;
Ok(body)
},
}
}

Expand Down
3 changes: 0 additions & 3 deletions dsc_lib/src/dscresources/resource_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ pub enum SchemaKind {
/// The schema is embedded in the manifest.
#[serde(rename = "embedded")]
Embedded(Value),
/// The schema is retrieved from a URL. Required for intellisense support.
#[serde(rename = "url")]
Url(String),
}

#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
Expand Down

0 comments on commit 0ba0fa9

Please sign in to comment.