diff --git a/Cargo.lock b/Cargo.lock index 6107dee327b..1f0e93d9428 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3727,6 +3727,16 @@ dependencies = [ "redox_syscall", ] +[[package]] +name = "libyml" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3302702afa434ffa30847a83305f0a69d6abd74293b6554c18ec85c7ef30c980" +dependencies = [ + "anyhow", + "version_check", +] + [[package]] name = "libz-rs-sys" version = "0.5.1" @@ -3999,24 +4009,24 @@ dependencies = [ [[package]] name = "mithril-api-spec" -version = "0.1.2" +version = "0.1.3" dependencies = [ "jsonschema", "mithril-common", "reqwest", "serde", "serde_json", - "serde_yaml", + "serde_yml", "warp", ] [[package]] name = "mithril-build-script" -version = "0.2.25" +version = "0.2.26" dependencies = [ "semver", "serde_json", - "serde_yaml", + "serde_yml", ] [[package]] @@ -6448,16 +6458,18 @@ dependencies = [ ] [[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" +name = "serde_yml" +version = "0.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +checksum = "59e2dd588bf1597a252c3b920e0143eb99b0f76e4e082f4c92ce34fbc9e71ddd" dependencies = [ "indexmap 2.10.0", "itoa", + "libyml", + "memchr", "ryu", "serde", - "unsafe-libyaml", + "version_check", ] [[package]] @@ -7515,12 +7527,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "unsigned-varint" version = "0.7.2" diff --git a/internal/mithril-build-script/Cargo.toml b/internal/mithril-build-script/Cargo.toml index 6291e1d33df..046eb8a7baf 100644 --- a/internal/mithril-build-script/Cargo.toml +++ b/internal/mithril-build-script/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-build-script" -version = "0.2.25" +version = "0.2.26" description = "A toolbox for Mithril crates build scripts" authors = { workspace = true } edition = { workspace = true } @@ -12,4 +12,4 @@ include = ["**/*.rs", "Cargo.toml", "README.md", ".gitignore"] [dependencies] semver = { workspace = true } serde_json = { workspace = true } -serde_yaml = "0.9.34" +serde_yml = "0.0.12" diff --git a/internal/mithril-build-script/src/open_api.rs b/internal/mithril-build-script/src/open_api.rs index 26770002b10..242e049de16 100644 --- a/internal/mithril-build-script/src/open_api.rs +++ b/internal/mithril-build-script/src/open_api.rs @@ -29,7 +29,7 @@ pub fn list_all_open_api_spec_files(paths: &[&Path]) -> Vec { fn read_version_from_open_api_spec_file>(spec_file_path: P) -> OpenAPIVersionRaw { let yaml_spec = fs::read_to_string(spec_file_path).unwrap(); - let open_api: serde_yaml::Value = serde_yaml::from_str(&yaml_spec).unwrap(); + let open_api: serde_yml::Value = serde_yml::from_str(&yaml_spec).unwrap(); open_api["info"]["version"].as_str().unwrap().to_owned() } diff --git a/internal/tests/mithril-api-spec/Cargo.toml b/internal/tests/mithril-api-spec/Cargo.toml index 3e4ad960099..113a2ba6687 100644 --- a/internal/tests/mithril-api-spec/Cargo.toml +++ b/internal/tests/mithril-api-spec/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-api-spec" -version = "0.1.2" +version = "0.1.3" authors.workspace = true documentation.workspace = true edition.workspace = true @@ -13,7 +13,7 @@ jsonschema = { version = "0.30.0" } reqwest = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } -serde_yaml = { version = "0.9.34" } +serde_yml = "0.0.12" warp = { workspace = true } [dev-dependencies] diff --git a/internal/tests/mithril-api-spec/src/apispec.rs b/internal/tests/mithril-api-spec/src/apispec.rs index 74da2774683..7f41cb3dcf4 100644 --- a/internal/tests/mithril-api-spec/src/apispec.rs +++ b/internal/tests/mithril-api-spec/src/apispec.rs @@ -56,7 +56,7 @@ impl<'a> APISpec<'a> { /// APISpec factory from spec pub fn from_file(path: &str) -> APISpec<'a> { let yaml_spec = std::fs::read_to_string(path).unwrap(); - let openapi: serde_json::Value = serde_yaml::from_str(&yaml_spec).unwrap(); + let openapi: serde_json::Value = serde_yml::from_str(&yaml_spec).unwrap(); APISpec { openapi, path: None,