How to Generate C# Http Client in NSwag Swagger codegen Swashbuckle

  Рет қаралды 39,281

Logan Dunning

Logan Dunning

4 жыл бұрын

Mic Used in Video amzn.to/3tD7FXt
Generate a .Net Dotnet core 2.0 2.1 2.2 3.0 3.1 C# 8 Http Client in NSwag Swagger Swashbuckle for free with writting little to zero code inside the client. dynamically generate http client from open api specification documentation. Just like postman, swagger is great, hope you enjoyed this swagger tutorial.
github.com/RicoSuter/NSwag/wi...

Пікірлер: 17
@yippykaiyay012
@yippykaiyay012 3 жыл бұрын
Nice overview, will give it a try.
@ebadmas9506
@ebadmas9506 4 жыл бұрын
Nicely explained. Thank you.
@LoganDunning
@LoganDunning 4 жыл бұрын
Thank you!! :)
@vacalepic6768
@vacalepic6768 2 жыл бұрын
Look up “connected service” in vs2019 or vs2022, it does the same thing without using nswag tool, so no need to copy and paste
@TmpVideo
@TmpVideo Жыл бұрын
Thanks for the informative video. Can it be used with soap and c# libraries?
@PatGarvey
@PatGarvey 4 жыл бұрын
Logan, nice overview. One question, I keep getting FileResponse type. I.E. - public System.Threading.Tasks.Task GetAllAsync(). Is there something I am missing in settings or annotations on the API. Thanks, Pat
@LoganDunning
@LoganDunning 4 жыл бұрын
Hmmm.. Could you try the [produces(typeof(object))] annotation? Are you getting it when calling the api or nswag codegen'ing? Hope that helps!
@sunilanthony17
@sunilanthony17 2 жыл бұрын
Wow, that is awesome.
@Tall-Cool-Drink
@Tall-Cool-Drink 3 жыл бұрын
Very helpful. thank you.
@LoganDunning
@LoganDunning 3 жыл бұрын
Glad to help!😁 🙏 hope you have a great day
@godfathermikal
@godfathermikal 3 жыл бұрын
Helpful. Any tips on how to get create the generated client without NSwag Studio? I want to generate the Swagger documentation at build time and create an updated client each time I build my project. Possibly as a NuGet package or something like that.
@LoganDunning
@LoganDunning 3 жыл бұрын
nSwag has a build time client generator, I'm sure there are other options out there, hope that helps :)
@dotnetdevni
@dotnetdevni 2 жыл бұрын
Can NSWAG handle jwt tokens and refresh tokens? what about auth against a login table
@vivekakula3002
@vivekakula3002 2 жыл бұрын
Logan how to get server information in this Api specific documentation after info
@tmstechschool7239
@tmstechschool7239 2 жыл бұрын
how about dotnet core 5 or 6
@LoganDunning
@LoganDunning 2 жыл бұрын
in.net core five and six it’s the exact same process. Hope that helps
@vacalepic6768
@vacalepic6768 2 жыл бұрын
@@LoganDunning connected service feature has nswag built in. No more copying and pasting from nswag studio
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 39 МЛН
NativeAOT in .NET 8 Has One Big Problem
14:47
Nick Chapsas
Рет қаралды 27 М.
Middleware Pattern For HttpClient With Delegating Handlers
17:07
Milan Jovanović
Рет қаралды 14 М.
All You Need To Know About IHttpClientFactory in ASP.Net Core
15:11
Configuring Swagger in WebAPI - A TimCo Retail Manager Video
42:51
IAmTimCorey
Рет қаралды 116 М.
I Never Want to Create APIs Any Other Way
17:32
Marius Espejo
Рет қаралды 22 М.
Swagger is Going Away in .NET 9!
10:48
Nick Chapsas
Рет қаралды 91 М.
.NET Core with Swagger and C# Client
21:05
Thiago Passos
Рет қаралды 23 М.
🤖 Automate API with Nswag ( Generating C#, Typescript http clients )
14:31
Full Stack Developer 🎭
Рет қаралды 3,5 М.
The FASTEST Way To Build API Clients in .NET
12:39
Codewrinkles
Рет қаралды 5 М.
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 39 МЛН