Repository navigation
v0.3.0-beta.3
Pre-releaseChanges in beta.3
Fix: message name collisions and empty serde rename (#8)
Breaking change from beta.2: message names in components.messages and asyncapi_message_names() now use the Rust variant identifier (e.g. CurrentEditor) rather than the serde rename string (e.g. "current-editor"). The serde rename is preserved as the wire discriminant inside each variant's payload schema.
Why: serde rename strings are wire-format values — they can be empty, contain dots and hyphens, and are not unique across multiple enums. Using variant identifiers produces stable, code-generation-friendly names.
New attribute: #[asyncapi(message_name = "CustomName")] on a variant overrides the default (variant ident). Use this to disambiguate when two enums share a variant identifier (e.g. OperationResponse::GetInfo → message_name = "GetInfoResponse").
Collision detection: AsyncApi derive now panics at runtime with a clear message if two message types produce the same message name, instead of silently overwriting one.
Migration from beta.2: update any code that looks up messages by serde rename key (e.g. messages.get("user.join")) to use the variant ident (messages.get("UserJoin")), or add #[asyncapi(message_name = "user.join")] to restore the old name.
Dependency
asyncapi-rust = { git = "https://github.com/mlilback/asyncapi-rust", tag = "v0.3.0-beta.3" }