News for hackers. Stuff that matters.
Re:Show HN: An opinionated and statically-typed TypeScript S... by yodon on Wednesday August 31, 2022 @01:06PM (#32665183)
Nice! Any plans for generating C# sdk's?
Re:Show HN: An opinionated and statically-typed TypeScript S... by benbristow on Wednesday August 31, 2022 @02:14PM (#32666158)
I feel a bit spammy as I just commented on a comment a bit higher with the same thing, but NSwag will do the trick for you.

https://github.com/RicoSuter/NSwag

Works a treat and is open-source, integrates nicely with ASP WebAPI projects. Can even generate TypeScript clients with a choice of HTTP library (axios/fetch etc.) or even an Angular based client.

Re:Show HN: An opinionated and statically-typed TypeScript S... by yodon on Wednesday August 31, 2022 @04:45PM (#32668124)
Thanks - NSwag had already been on my list to look at next week. The difference I see is that NSwag GitHub page is many screen heights long and it looks like I'm going to have to spend a bunch of time figuring it out. EasySDK was just click to upload a swagger file and I have a great looking TypeScript SDK, done.
Re:Show HN: An opinionated and statically-typed TypeScript S... by yodon on Wednesday August 31, 2022 @07:26PM (#32669663)
Following up on this, the NSwag docs are definitely not as user friendly as the EasySdk site, but I was able to install and run the windows GUI app for NSwag and compare handling of a moderately large swagger file. EasySDK generated a TypeScript file that was 1/4 the size, far more readable, and from what I could tell as capable as the NSwag generated TypeScript file. That said, NSwag can generate C# files which EasySdk can not do (yet). Kiota (mentioned elsewhere in the comments) was unable to parse the swagger file.
Re:Show HN: An opinionated and statically-typed TypeScript S... by ndimares on Wednesday August 31, 2022 @01:10PM (#32665247)
We're working on expanding the generator to be able to easily add new languages. Will definitely look at supporting C#!
Re:Show HN: An opinionated and statically-typed TypeScript S... by simplesager on Wednesday August 31, 2022 @01:20PM (#32665415)
Would love to know more about this , how do you plan on using it ?