diff --git a/qbittorrent-web-api-gen/src/generate/group.rs b/qbittorrent-web-api-gen/src/generate/group.rs index 01a5d25..114fd32 100644 --- a/qbittorrent-web-api-gen/src/generate/group.rs +++ b/qbittorrent-web-api-gen/src/generate/group.rs @@ -97,6 +97,12 @@ impl types::Type { }, }; + let owned_type = if self.is_optional() { + quote! { std::option::Option<#owned_type> } + } else { + owned_type + }; + if self.is_list() { quote! { std::vec::Vec<#owned_type> } } else {