Hacker News new | ask | show | jobs
by yodon 1389 days ago
Nice! Any plans for generating C# sdk's?
3 comments

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.

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.
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.
We're working on expanding the generator to be able to easily add new languages. Will definitely look at supporting C#!
Would love to know more about this , how do you plan on using it ?