@@ -69,12 +69,12 @@ private static string GetImportType(Type? innerSourceType, Type sourceType)
6969 private static string ? GetZodOutputType ( OutputProperty property , IEnumerable < OutputType > allTypes )
7070 {
7171 if ( ! property . IsBuiltin && property . SourceType . IsEnum )
72- return $ "z.nativeEnum ({ property . SourceType . Name } )";
72+ return $ "z.enum ({ property . SourceType . Name } )";
7373 else if ( ! property . IsBuiltin && property . IsNullable && property . SourceType . IsGenericType )
7474 {
7575 var sourceType = TypeChecks . GetGenericType ( property . SourceType ) ;
7676 if ( sourceType . IsEnum )
77- return $ "z.nativeEnum ({ sourceType . Name } ).nullable()";
77+ return $ "z.enum ({ sourceType . Name } ).nullable()";
7878 }
7979
8080 string ? output ;
@@ -124,17 +124,17 @@ private static string GetImportType(Type? innerSourceType, Type sourceType)
124124 if ( IsOfType ( sourceType , typeof ( string ) ) )
125125 output = "z.string()" ;
126126 else if ( IsOfType ( sourceType , typeof ( Guid ) ) )
127- output = "z.string().uuid ()" ;
127+ output = "z.guid ()" ;
128128 else if ( IsOfType ( sourceType , typeof ( int ) , typeof ( long ) , typeof ( float ) , typeof ( double ) , typeof ( short ) , typeof ( byte ) , typeof ( decimal ) ) )
129129 output = "z.number()" ;
130130 else if ( IsOfType ( sourceType , typeof ( bool ) ) )
131131 output = "z.boolean()" ;
132132 else if ( IsOfType ( sourceType , typeof ( DateTime ) , typeof ( DateTimeOffset ) ) )
133- output = "z.string() .datetime({ offset: true })" ;
133+ output = "z.iso .datetime({ offset: true })" ;
134134 else if ( IsOfType ( sourceType , typeof ( DateOnly ) ) )
135- output = "z.string() .date()" ;
135+ output = "z.iso .date()" ;
136136 else if ( IsOfType ( sourceType , typeof ( TimeOnly ) ) )
137- output = "z.string() .time()" ;
137+ output = "z.iso .time()" ;
138138 else if ( IsOfType ( sourceType , typeof ( TimeSpan ) ) )
139139 output = "z.string()" ; // FIXME: Can assume some formatting here
140140 else if ( TypeChecks . ImplementsIEnumerable ( sourceType ) )
0 commit comments