fix: flag schema derive on schemars feature (#966)

This commit is contained in:
Jack Amadeo 2026-07-09 16:51:37 -07:00 committed by GitHub
parent 9e3de344f4
commit 60d3e77f52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -116,7 +116,7 @@ chrono = { version = "0.4.38", default-features = false, features = [
default = ["base64", "macros", "server"]
local = ["rmcp-macros?/local"]
client = ["dep:tokio-stream"]
server = ["transport-async-rw", "dep:schemars", "dep:pastey"]
server = ["transport-async-rw", "schemars", "dep:pastey"]
macros = ["dep:rmcp-macros", "dep:pastey"]
elicitation = ["dep:url"]

View file

@ -34,7 +34,7 @@ pub mod transport;
pub use pastey::paste;
#[cfg(all(feature = "macros", feature = "server"))]
pub use rmcp_macros::*;
#[cfg(any(feature = "server", feature = "schemars"))]
#[cfg(feature = "schemars")]
pub use schemars;
#[cfg(feature = "macros")]
pub use serde;

View file

@ -66,7 +66,7 @@ macro_rules! object {
/// without returning any specific data.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Copy, Eq)]
#[serde(deny_unknown_fields)]
#[cfg_attr(feature = "server", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[expect(clippy::exhaustive_structs, reason = "intentionally exhaustive")]
pub struct EmptyObject {}