Derive `ToSchema` not work for unit enum variants
cryscan opened this issue · 0 comments
cryscan commented
This code no longer compiles upgrading from v0.69.0 to v0.71.0:
use serde::{Deserialize, Serialize};
use salvo::oapi::ToSchema;
#[derive(Debug, Default, Clone, Serialize, Deserialize, ToSchema)]
#[serde(untagged)]
pub enum Array<T> {
#[default]
None, // Error: unit variant `Null` is not publicly re-exported
Item(T),
Vec(Vec<T>),
}