diff --git a/schemars_derive/src/lib.rs b/schemars_derive/src/lib.rs index d135804..0c2999d 100644 --- a/schemars_derive/src/lib.rs +++ b/schemars_derive/src/lib.rs @@ -94,7 +94,12 @@ fn schema_for_enum(variants: &[Variant]) -> TokenStream { gen.subschema_for::<#ty>() } } - Style::Tuple => unimplemented!("work in progress!"), + Style::Tuple => { + let types = variant.fields.iter().map(|f| f.ty); + quote! { + gen.subschema_for::<(#(#types),*)>() + } + } Style::Struct => unimplemented!("work in progress!"), Style::Unit => unreachable!("Unit variants already filtered out"), };