RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.61k stars 1.22k forks source link

C# TimeSpan not resolved and generated as a DayJs duration #4925

Open FreeFrags opened 1 week ago

FreeFrags commented 1 week ago

Im moving from MomentJS to DayJs in my code, i noticed that a C# TimeSpan was resolved as a moment,Duration. However now using DayJs it is resolving to a dayjs.Dayjs.

I made the following issue in NJsonSchema: https://github.com/RicoSuter/NJsonSchema/issues/1709

If you decide that it should be fixed in NJsonSchema then the proper import would probably be needed here too. https://github.com/RicoSuter/NSwag/blob/8af0c7106bd74ce0e3bb8c67df30eea933b57b45/src/NSwag.CodeGeneration.TypeScript/Templates/File.liquid#L70