diff --git a/poem-openapi/CHANGELOG.md b/poem-openapi/CHANGELOG.md index c6f31521a7..4a8208f602 100644 --- a/poem-openapi/CHANGELOG.md +++ b/poem-openapi/CHANGELOG.md @@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -# Unreleased +# [5.1.2] 2024-10-02 - implements `Serialize` and `Deserialize` for `poem_openapi::types::Any`. +- add `ParseError::message method` to get the error message. # [5.1.1] 2024-09-13 diff --git a/poem-openapi/Cargo.toml b/poem-openapi/Cargo.toml index ce65c0dfd4..9a97c9fcd0 100644 --- a/poem-openapi/Cargo.toml +++ b/poem-openapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "poem-openapi" -version = "5.1.1" +version = "5.1.2" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/poem-openapi/src/types/error.rs b/poem-openapi/src/types/error.rs index 4a8f73040b..095b777892 100644 --- a/poem-openapi/src/types/error.rs +++ b/poem-openapi/src/types/error.rs @@ -70,6 +70,11 @@ impl ParseError { pub fn into_message(self) -> String { self.message } + + /// Return the error message. + pub fn message(&self) -> &str { + &self.message + } } /// An error parsing a value of type `T`.