You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[derive(utoipa::ToSchema)]pubenumInnerEnum{A(String),B(f64),}// this works#[derive(utoipa::ToSchema)]pubstructOkOuter1{map:Option<InnerEnum>,}// this works#[derive(utoipa::ToSchema)]pubstructOkOuter2{map:HashMap<String,InnerEnum>,}// this fails#[derive(utoipa::ToSchema)]pubstructBadOuter{map:HashMap<String,Option<InnerEnum>>,}
The (presumably) same issue also occurs for BTreeMap<String, Option<InnerEnum>>.
This seems to be a particular edge case of jsonschema type composition, as this workaround, which would describe an identical JSON-serialized document, works fine:
E.g. the following fails with a compile error:
The (presumably) same issue also occurs for
BTreeMap<String, Option<InnerEnum>>
.This seems to be a particular edge case of jsonschema type composition, as this workaround, which would describe an identical JSON-serialized document, works fine:
The text was updated successfully, but these errors were encountered: