Skip to content

Commit

Permalink
chore: upgrade jsonschema to 0.26 (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
leon3s authored Oct 30, 2024
1 parent 4b1334c commit 0586efc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
28 changes: 10 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/nanocld/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ chrono = { version = "0.4", default-features = false, features = [
"clock",
"serde",
] }
jsonschema = { version = "0.24", default-features = false }
jsonschema = { version = "0.26", default-features = false }
nanocld_client = { version = "0.16", features = ["tokio"] }
metrsd_client = "0.5"
nanocl_stubs = { version = "0.16", features = ["serde", "clap"] }
Expand Down
6 changes: 1 addition & 5 deletions bin/nanocld/src/repositories/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,7 @@ impl ResourceDb {
HttpError::bad_request(format!("Invalid schema {}", err))
})?;
schema.validate(&resource.data).map_err(|err| {
let mut msg = String::from("Invalid config ");
for error in err {
msg += &format!("{} ", error);
}
HttpError::bad_request(msg)
HttpError::bad_request(format!("Invalid schema {err}"))
})?;
}
if let Some(url) = &kind.data.url {
Expand Down

0 comments on commit 0586efc

Please sign in to comment.