Hacker News new | past | comments | ask | show | jobs | submit login

In .NET Core there is a nuget package you can add that generates the open api docs based on your controllers. It's a good start, though to make it fully accurate you have to add the right attributes to each endpoint. It works pretty well.

What I find really irksome about the .NET openapi tooling is the client generators use RestSharp under the hood which doesn't support HttpClient. There's no way you shouldn't be using HttpClient in 2020. So companies leveraging openapi to generate their SDKs are generating sub-par code.




What's the problem with RestSharp?

Used it a while ago and it was pretty easy to use.


It doesn't use HttpClient under the hood. So, it can't make use of DelegatingHandlers. Polly is build on DelegatingHandlers. They're incredibly useful.

RestSharp is old. It's from a bygone era when making Http requests in .NET looked very different.

You'll find Refit or Flurl are also easy to use but are a significant upgrade due to being able to use HttpClient.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: