Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced serde_yaml with serde_yml #1280

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions utoipa/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions utoipa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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"] }

Expand Down
2 changes: 1 addition & 1 deletion utoipa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions utoipa/src/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, serde_yaml::Error> {
serde_yaml::to_string(self)
pub fn to_yaml(&self) -> Result<String, serde_yml::Error> {
serde_yml::to_string(self)
}

/// Merge `other` [`OpenApi`] moving `self` and returning combined [`OpenApi`].
Expand Down
Loading