Skip to content

Commit 2a788ca

Browse files
committed
chore: replace serde_yaml with serde_yml in mithril-build-script and mithril-api-spec
1 parent b76f911 commit 2a788ca

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed

Cargo.lock

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/mithril-build-script/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ include = ["**/*.rs", "Cargo.toml", "README.md", ".gitignore"]
1212
[dependencies]
1313
semver = { workspace = true }
1414
serde_json = { workspace = true }
15-
serde_yaml = "0.9.34"
15+
serde_yml = "0.0.12"

internal/mithril-build-script/src/open_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn list_all_open_api_spec_files(paths: &[&Path]) -> Vec<PathBuf> {
2929

3030
fn read_version_from_open_api_spec_file<P: AsRef<Path>>(spec_file_path: P) -> OpenAPIVersionRaw {
3131
let yaml_spec = fs::read_to_string(spec_file_path).unwrap();
32-
let open_api: serde_yaml::Value = serde_yaml::from_str(&yaml_spec).unwrap();
32+
let open_api: serde_yml::Value = serde_yml::from_str(&yaml_spec).unwrap();
3333
open_api["info"]["version"].as_str().unwrap().to_owned()
3434
}
3535

internal/tests/mithril-api-spec/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jsonschema = { version = "0.30.0" }
1313
reqwest = { workspace = true }
1414
serde = { workspace = true }
1515
serde_json = { workspace = true }
16-
serde_yaml = { version = "0.9.34" }
16+
serde_yml = "0.0.12"
1717
warp = { workspace = true }
1818

1919
[dev-dependencies]

internal/tests/mithril-api-spec/src/apispec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl<'a> APISpec<'a> {
5656
/// APISpec factory from spec
5757
pub fn from_file(path: &str) -> APISpec<'a> {
5858
let yaml_spec = std::fs::read_to_string(path).unwrap();
59-
let openapi: serde_json::Value = serde_yaml::from_str(&yaml_spec).unwrap();
59+
let openapi: serde_json::Value = serde_yml::from_str(&yaml_spec).unwrap();
6060
APISpec {
6161
openapi,
6262
path: None,

0 commit comments

Comments
 (0)