I have a problem, it's about generating ApiException class. if we generate first openapi, no problem to generate this class but when we try to add second open api reference , generator doesn,t generate ApiException. How can I fix this bug?
I'm pretty sure HttpClient is an IDisposable. Even tho this is a beginner tutorial (because it uses minimal API for the service), proper memory management should always be shown in tutorials to scare away managers from coding ;-)
@@_torgeek9108 I don't see your point; not disposing HttpClient instances created via IHttpClientFactory is even worse because the connection pool relies on speed reclaiming of unused instances which is signaled with Dispose().
@@ПавелФамильевич Yeah right, var client = new HttpClient(); automatically magically pulls out and manages the instance in the non existing service provider. Sounds about right, thanks for your wisdom Mr. Random-Clueless-Poster or LLM bot. Ah, it's always good to know my job is safe.
Can you tell me how to acces the response status?
I have a problem, it's about generating ApiException class. if we generate first openapi, no problem to generate this class but when we try to add second open api reference , generator doesn,t generate ApiException. How can I fix this bug?
I'm pretty sure HttpClient is an IDisposable.
Even tho this is a beginner tutorial (because it uses minimal API for the service), proper memory management should always be shown in tutorials to scare away managers from coding ;-)
Lol, it sure is disposable until you the socket exhaustion headache shows its ugly head on your project if IHttpClientFactory is not used instead 😅
@@_torgeek9108 I don't see your point; not disposing HttpClient instances created via IHttpClientFactory is even worse because the connection pool relies on speed reclaiming of unused instances which is signaled with Dispose().
It's managed by DI and does NOT require manual disposal. Please learn you stuff before posting
@@ПавелФамильевич Yeah right, var client = new HttpClient(); automatically magically pulls out and manages the instance in the non existing service provider. Sounds about right, thanks for your wisdom Mr. Random-Clueless-Poster or LLM bot. Ah, it's always good to know my job is safe.