Skip to content

Commit 18a19d1

Browse files
committed
remove support to retrieve schema from URL
1 parent 5b9ce43 commit 18a19d1

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

dsc_lib/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ indicatif = { version = "0.17" }
1111
jsonschema = "0.17"
1212
num-traits = "0.2"
1313
regex = "1.7"
14-
reqwest = { version = "0.12", features = ["blocking"] }
1514
schemars = { version = "0.8.12", features = ["preserve_order"] }
1615
serde = { version = "1.0", features = ["derive"] }
1716
serde_json = { version = "1.0", features = ["preserve_order"] }

dsc_lib/src/dscerror.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use std::str::Utf8Error;
55

66
use indicatif::style::TemplateError;
7-
use reqwest::StatusCode;
87
use thiserror::Error;
98
use tracing::error;
109
use tree_sitter::LanguageError;
@@ -29,12 +28,6 @@ pub enum DscError {
2928
#[error("Function '{0}' error: {1}")]
3029
FunctionArg(String, String),
3130

32-
#[error("HTTP: {0}")]
33-
Http(#[from] reqwest::Error),
34-
35-
#[error("HTTP status: {0}")]
36-
HttpStatus(StatusCode),
37-
3831
#[error("Function integer argument conversion error: {0}")]
3932
IntegerConversion(#[from] std::num::ParseIntError),
4033

dsc_lib/src/dscresources/command_resource.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -453,17 +453,6 @@ pub fn get_schema(resource: &ResourceManifest, cwd: &str) -> Result<String, DscE
453453
let json = serde_json::to_string(schema)?;
454454
Ok(json)
455455
},
456-
SchemaKind::Url(ref url) => {
457-
// TODO: cache downloaded schemas so we don't have to download them every time
458-
let mut response = reqwest::blocking::get(url)?;
459-
if !response.status().is_success() {
460-
return Err(DscError::HttpStatus(response.status()));
461-
}
462-
463-
let mut body = String::new();
464-
response.read_to_string(&mut body)?;
465-
Ok(body)
466-
},
467456
}
468457
}
469458

dsc_lib/src/dscresources/resource_manifest.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ pub enum SchemaKind {
126126
/// The schema is embedded in the manifest.
127127
#[serde(rename = "embedded")]
128128
Embedded(Value),
129-
/// The schema is retrieved from a URL. Required for intellisense support.
130-
#[serde(rename = "url")]
131-
Url(String),
132129
}
133130

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

0 commit comments

Comments
 (0)