diff --git a/README.md b/README.md index 392e02c0..bc7d92ca 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ and the `ipa` is _api_ reversed. Aaand... `ipa` is also an awesome type of beer ## Crate Features - **`macros`** Enable `utoipa-gen` macros. **This is enabled by default.** -- **`yaml`**: Enables **serde_yaml** serialization of OpenAPI objects. +- **`yaml`**: Enables **serde_yml** serialization of OpenAPI objects. - **`actix_extras`**: Enhances [actix-web](https://github.com/actix/actix-web/) integration with being able to parse `path`, `path` and `query` parameters from actix web path attribute macros. See [docs](https://docs.rs/utoipa/latest/utoipa/attr.path.html#actix_extras-feature-support-for-actix-web) or [examples](./examples) for more details. diff --git a/utoipa/CHANGELOG.md b/utoipa/CHANGELOG.md index f02592ae..394f961e 100644 --- a/utoipa/CHANGELOG.md +++ b/utoipa/CHANGELOG.md @@ -3,6 +3,12 @@ **`utoipa`** is in direct correlation with **`utoipa-gen`** ([CHANGELOG.md](../utoipa-gen/CHANGELOG.md)). You might want to look into changes introduced to **`utoipa-gen`**. +## Unreleased + +### Changed + +* Replaced `serde_yaml` with `serde_yml` (https://github.com/juhaku/utoipa/pull/1280) + ## 5.3.1 - Jan 6 2025 ### Changed diff --git a/utoipa/Cargo.toml b/utoipa/Cargo.toml index c87bcc56..5fad7e07 100644 --- a/utoipa/Cargo.toml +++ b/utoipa/Cargo.toml @@ -30,7 +30,7 @@ chrono = ["utoipa-gen?/chrono"] decimal = ["utoipa-gen?/decimal"] decimal_float = ["utoipa-gen?/decimal_float"] non_strict_integers = ["utoipa-gen?/non_strict_integers"] -yaml = ["serde_yaml", "utoipa-gen?/yaml"] +yaml = ["serde_yml", "utoipa-gen?/yaml"] uuid = ["utoipa-gen?/uuid"] ulid = ["utoipa-gen?/ulid"] url = ["utoipa-gen?/url"] @@ -51,7 +51,7 @@ auto_into_responses = ["utoipa-gen?/auto_into_responses"] [dependencies] serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } -serde_yaml = { version = "0.9", optional = true } +serde_yml = { version = "0.0", optional = true } utoipa-gen = { version = "5.3.1", path = "../utoipa-gen", optional = true } indexmap = { version = "2", features = ["serde"] } diff --git a/utoipa/src/lib.rs b/utoipa/src/lib.rs index f2e61852..93dbfab1 100644 --- a/utoipa/src/lib.rs +++ b/utoipa/src/lib.rs @@ -60,7 +60,7 @@ //! # Crate Features //! //! * **`macros`** Enable `utoipa-gen` macros. **This is enabled by default.** -//! * **`yaml`** Enables **serde_yaml** serialization of OpenAPI objects. +//! * **`yaml`** Enables **serde_yml** serialization of OpenAPI objects. //! * **`actix_extras`** Enhances [actix-web](https://github.com/actix/actix-web/) integration with being able to //! parse `path`, `path` and `query` parameters from actix web path attribute macros. See [actix extras support][actix_path] or //! [examples](https://github.com/juhaku/utoipa/tree/master/examples) for more details. diff --git a/utoipa/src/openapi.rs b/utoipa/src/openapi.rs index 1925fdfd..5d0dad76 100644 --- a/utoipa/src/openapi.rs +++ b/utoipa/src/openapi.rs @@ -163,11 +163,11 @@ impl OpenApi { serde_json::to_string_pretty(self) } - /// Converts this [`OpenApi`] to YAML String. This method essentially calls [`serde_yaml::to_string`] method. + /// Converts this [`OpenApi`] to YAML String. This method essentially calls [`serde_yml::to_string`] method. #[cfg(feature = "yaml")] #[cfg_attr(doc_cfg, doc(cfg(feature = "yaml")))] - pub fn to_yaml(&self) -> Result { - serde_yaml::to_string(self) + pub fn to_yaml(&self) -> Result { + serde_yml::to_string(self) } /// Merge `other` [`OpenApi`] moving `self` and returning combined [`OpenApi`].