Skip to content

Commit

Permalink
replaced serde_yml with serde_norway (#1311)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenuxPlays authored Feb 8, 2025
1 parent 88a5842 commit 9c51272
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
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_yml** serialization of OpenAPI objects.
- **`yaml`**: Enables **serde_norway** 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
2 changes: 1 addition & 1 deletion utoipa/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ to look into changes introduced to **`utoipa-gen`**.

### Changed

* Replaced `serde_yaml` with `serde_yml` (https://github.com/juhaku/utoipa/pull/1280)
* Replaced `serde_yaml` with `serde_norway` (https://github.com/juhaku/utoipa/pull/1311)

## 5.3.1 - Jan 6 2025

Expand Down
4 changes: 2 additions & 2 deletions utoipa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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_yml", "utoipa-gen?/yaml"]
yaml = ["serde_norway", "utoipa-gen?/yaml"]
uuid = ["utoipa-gen?/uuid"]
ulid = ["utoipa-gen?/ulid"]
url = ["utoipa-gen?/url"]
Expand All @@ -59,7 +59,7 @@ auto_into_responses = ["utoipa-gen?/auto_into_responses"]
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
serde_yml = { version = "0.0", optional = true }
serde_norway = {version = "0.9.42", 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_yml** serialization of OpenAPI objects.
//! * **`yaml`** Enables **serde_norway** 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_yml::to_string`] method.
/// Converts this [`OpenApi`] to YAML String. This method essentially calls [`serde_norway::to_string`] method.
#[cfg(feature = "yaml")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "yaml")))]
pub fn to_yaml(&self) -> Result<String, serde_yml::Error> {
serde_yml::to_string(self)
pub fn to_yaml(&self) -> Result<String, serde_norway::Error> {
serde_norway::to_string(self)
}

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

0 comments on commit 9c51272

Please sign in to comment.