-
Notifications
You must be signed in to change notification settings - Fork 328
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
[cosmwasm-schema] unknown serde variant attribute untagged
#1990
Comments
Just to elaborate, this would be used to effectively "embed" or "inherit" another ExecuteMsg, for example, to implement a standard interface. If there's a better way to do this ergonomically I'm all ears, but I found this error preventing me from the most idiomatic solution. |
Seems like this happens when Maybe there could be an option such as |
You have two options here:
#[cw_serde]
#[serde(untagged)]
pub enum Parent {
MyMsgs(MyMsgs),
Baz(Child),
}
#[cw_serde]
pub enum MyMsgs {
Foo { x: u128 },
Bar { y: String },
}
#[cw_serde]
pub enum Child {
A { x: u128 },
B { y: String },
} One thing to note here is that in the past, |
@aumetra We should make sure this is supported in the new schema format |
When trying to add serde attributes, I get the "unknown serde variant attribute" error. Sample code:
And the compiler error:
The text was updated successfully, but these errors were encountered: