quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

C# Renderer with `--features just-types` doesn't include required `using`s.

Open gregmarr opened this issue 1 year ago • 0 comments

If you run the C# renderer with --features just-types --array-type list then it creates List<T> properties, but doesn't add the required using System.Collections.Generic;. It also happens without the --array-type list if a Dictionary<K,V> is generated as a property.

This is due to the checks here, with FIXMEs from 6 years ago pointing out this exact bug. https://github.com/glideapps/quicktype/blob/916cd94a9d4fdeab870b6a12f42ad43ebaedf314/packages/quicktype-core/src/language/CSharp.ts#L851 https://github.com/glideapps/quicktype/blob/916cd94a9d4fdeab870b6a12f42ad43ebaedf314/packages/quicktype-core/src/language/CSharp.ts#L1579

gregmarr avatar Feb 27 '24 20:02 gregmarr