WebAPI Improvements in .NET 5 - OpenAPI, Better F5, and NSwag

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 162

  • @CAPS_AMERICA
    @CAPS_AMERICA 2 ปีที่แล้ว +2

    I'm just starting to catch up with .net 5 and 6, and this is an amazing learning article to start with, thank you for the great details you put in this, Tim, and the easy-to-understand examples you are creating. As always, your channel is one of my go-to YT channel to learn new stuff in C#/.Net. cheers

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      I am glad it was helpful.

  • @RalfsBalodis
    @RalfsBalodis 4 ปีที่แล้ว +7

    0:00 - Intro
    0:56 - OpenAPI: Building ASP .NET Core Web API app
    3:53 - Demo App overview: configuration
    8:13 - Demo App overview: OpenAPI with Swagger
    14:07 - swagger.json
    15:48 - Using swagger.json in Blazor Web Assembly App:
    18:35 - • Connected services: Swagger Client
    21:28 - • Connecting to OpenAPI
    27:29 - • CORS policy exception explained
    30:00 - • OpenAPI: Add CORS
    33:59 - NSwag generated code
    37:01 - Connecting to OpenAPi from console app
    43:32 - Note on HttpClienet
    44:38 - Summary and concluding remarks

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Thank you! Posted.

  • @TonoNamnum
    @TonoNamnum 4 ปีที่แล้ว +1

    Last example where you use a console application is great for understanding. Thanks Tim!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Glad it was helpful!

  • @ahmedjalalmalik4603
    @ahmedjalalmalik4603 4 ปีที่แล้ว +11

    @IAmTimCorey I loved the way to explain things. I am waiting for your tutorial on microservices with docker.

  • @zulhishamtan4308
    @zulhishamtan4308 4 ปีที่แล้ว +4

    Thanks Tim, great stuff. And awesome explanation.
    Awaiting for the authentication/authorization video.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You are welcome.

    • @AnthonyGriggs
      @AnthonyGriggs 4 ปีที่แล้ว +1

      @@IAmTimCorey I second that, awesome video... love the Blazor app demo coupled in as well. If you get a chance I would love your take on adding authentication in the Web API using Asp.Net Core Identity.

  • @emmanuel2842
    @emmanuel2842 4 ปีที่แล้ว +1

    Doing great Tim.. The really cool stuff I learnt was Paste JSON As Classes 😍😍... Looking forward to your Blazor series with Authorization (of components) and Authentication (of users) using OpenApi

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Glad it was helpful.

  • @zoltan.halasz
    @zoltan.halasz 4 ปีที่แล้ว

    I can see there are improvements in .net core. More and more features added. I hope I can catch up one day 😊

  • @HungTran-jx2xc
    @HungTran-jx2xc 4 ปีที่แล้ว +5

    Thank you Tim,
    can you go deeper on topic generated client, please. Such as, intergrared authentication, availabe/limited data model binding(from a generated client's request to api controller).
    Why the generated client is using newtonsoft, where dotnet core system.text.json library?

    • @UzairAli001
      @UzairAli001 4 ปีที่แล้ว

      I would also like to see in depth tutorial for NSwagger

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      I will add it to the list. Thanks for the suggestion.

  • @jwalkerjr
    @jwalkerjr 4 ปีที่แล้ว

    Great job, Tim. Love it. Very informative. Kind of reminds me of good old XSD-generated code. There's always the good and the bad. As you mentioned, with proper API versioning, this kind of thing can be managed, and I, for one, always appreciate a contract.

  • @expertreviews1112
    @expertreviews1112 3 ปีที่แล้ว

    As always, awesome content Tim!!!

  • @ibrahimhussain3248
    @ibrahimhussain3248 4 ปีที่แล้ว +4

    Nice 👍👍👍
    Btw... I figured out how to make pluggable apps with C#. I already knew interfaces and reflection so I just had to figure out the project structure.
    I would like to see a tutorial on it though

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I will add it to the list. Thanks for the suggestion.

  • @jimw021
    @jimw021 4 ปีที่แล้ว +1

    In VS 16.8.3 there is a separate template item in the first list for Web API as opposed to choosing Web Application, choose ASP.NET Core Web API

  • @upcsatx
    @upcsatx 4 ปีที่แล้ว

    Great video! At 32:42 do you see any issue with setting builder.WithOrigins("*") if I'm OK with everyone being able to GET things?

  • @troymitchel4790
    @troymitchel4790 4 ปีที่แล้ว +24

    Great stuff! Do you think you could create a course with WebAPI and React?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +7

      Not sure about React. I've got a ways to go before I get into JavaScript frameworks.

    • @JohnPeter-yf5jf
      @JohnPeter-yf5jf 4 ปีที่แล้ว

      Maybe blazer?

    • @jo0h4n18
      @jo0h4n18 4 ปีที่แล้ว

      @@JohnPeter-yf5jf Tim has a lot of Blazor videos for you to check out

  • @chaitusunkara
    @chaitusunkara 4 ปีที่แล้ว

    Swagger allows documenting of APIs a bit easier and therefore when you want to give the definition of the API to others (not necessarily for creating client object), it’s a good way to understand the inputs, outputs etc.

  • @x_salaheddinechannel_x
    @x_salaheddinechannel_x 4 ปีที่แล้ว +5

    Thank you Tim Corey for this video, and we need video for Xamarin android. Thanks and best Regards.

  • @twotime5430
    @twotime5430 4 ปีที่แล้ว

    Wow Tim, this was great!!! Exactly, what I was looking for!

  • @jamesbest2221
    @jamesbest2221 4 ปีที่แล้ว +15

    p.s. I second Troy Mitchel's request for a course with WebAPI and React?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Thanks for the vote.

    • @kevincordell9539
      @kevincordell9539 4 ปีที่แล้ว +5

      @@IAmTimCorey I would rather see Angular than React :-)

    • @parko1965
      @parko1965 4 ปีที่แล้ว

      Blazor Wasm, it's new, that's my opinion.

  • @amirhosseinbagheri824
    @amirhosseinbagheri824 3 ปีที่แล้ว

    Hey Tim
    Thanks for uploading this video. Have you found a way to read the response headers?

  • @smatveev
    @smatveev 3 ปีที่แล้ว

    Very useful. Thanks a lot

  • @dwightstevenpadilla6483
    @dwightstevenpadilla6483 3 ปีที่แล้ว

    Sorry this might be out of the topic, but is it possible to have callback handler like nodejs inside api controller with void return type method instead of using iaction return types?

  • @MathieuMarchant
    @MathieuMarchant 3 ปีที่แล้ว

    Thanks for the video Tim. It would also be interesting to know how to add what the "OpenAPI" checkbox does, manually. What if you already have a project created with the box unchecked or start from another template like the ASP.NET Core template with React client in there. Probably it is not too much work. I'll generate a new project like that and see what the changes are.

  • @kevingates5851
    @kevingates5851 3 ปีที่แล้ว

    Hi Tim, how does the Connected Service work with your other videos of Display___Model? Like how would you use something like this, then later add data annotations? Or is this better mainly for displaying records that won't be edited?

  • @chintu2691994
    @chintu2691994 3 ปีที่แล้ว

    Hey, @IAmTimCorey do you make videos for angular if not then please start making them... I love the way you code and the way you explain.

  • @Christobanistan
    @Christobanistan 3 ปีที่แล้ว

    Tim, I was wondering if you've seen the SwitchStartupProject VS extension? It allows you set up a very simple json file with various project combinations you can select from in the VS UI, in a combobox. When you select one, it sets multiple startup projects instantly. I find it ridiculously useful!
    Additionally, I have an extension called MVVM Tools that will switch between Views and ViewModels instantly (C# or VB only) by pressing Ctrl+E,Q. It uses class naming conventions and optional per-project configurations which you can set up in Options | MVVM Tools.

  • @andywalter7426
    @andywalter7426 4 ปีที่แล้ว

    One suggestion of one topic i would love to have covered is web api with ssl when not using localhost. An example can be if your local ip address is 192.168.0.150 and you want to use ssl, then would still work. The purpose of this would be to be able to test with other computers on your network before submitting to azure or other web hosting. Currently only localhost works out of the box. However, obviously, somebody else on your network cannot access the page. Can be good for testing with multiple users before publishing a site.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You can open up your firewall and publish your IISExpress URL locally so that people can access it and test against it.

  • @PyaePhyoAung-xi9fh
    @PyaePhyoAung-xi9fh 3 ปีที่แล้ว

    Thank you, sir.

  • @yusufdm5472
    @yusufdm5472 4 ปีที่แล้ว +1

    Hi Tim, nice tutorial.
    Is NSwag is doing same thing to Web APIs as what WSDL.exe used to do to build proxy classes for web services?

    • @TheMiamiVice27
      @TheMiamiVice27 4 ปีที่แล้ว

      I would say it that they are equivalent. Web services (.asmx or WCF) are XML based, while Swagger is JSON based, without getting in the details ofc.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      It is a similar concept, yes.

  • @Denny093
    @Denny093 4 ปีที่แล้ว +1

    When I try to add connection service with the swagger.json on build it says Not compiled in the WPF Project, but it doesn't throw any error. Switching in te "build and run" settings from minimal to diagnostinc on verbosity i found that the error is about swaggerClient not found in namespace. to be clear I have created a WPF .NET 5 app so there should be no compatibility problems. Anyone know how to fix?

    • @BT-de4wl
      @BT-de4wl 4 ปีที่แล้ว

      I had the same issue, my mistake was when I was adding connected services I was adding it in the wrong solution. He's working with two solutions and adds connected services to "BlazorWasmDemo" . I did it on the wrong solution and got the same error. Just start again from the 18:40 mark and use the other solution and see if that helps!

  • @andywalter7426
    @andywalter7426 4 ปีที่แล้ว

    I have a question. When showing the demo, why did you not choose the aspnet core hosted for web assembly. I see that most professional developers would choose that option for most of their projects. What happens then is you still have the web assembly. However, it seems to make it easier to communicate with the backend. Especially of the back end is the same url as the web assembly pages.

    • @pilotboba
      @pilotboba 4 ปีที่แล้ว

      If you are talking about Server Side Blazor... there are con's against it.

    • @andywalter7426
      @andywalter7426 4 ปีที่แล้ว

      @@pilotboba No, I was talking about still using web assembly but aspnet core hosted. If that option is chosen, there are 3 projects in the solution. One is the server. One is the client and the last one is the shared. For the sample, the client already talks to the server weather service.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      When checking that option, you are creating an API project with your Blazor WebAssembly. I didn't want that because I already had an API. No need to create a second API.

  • @devcisse9425
    @devcisse9425 4 ปีที่แล้ว

    whats that cheat called in 40:13 and is it free for VS community 2019 ?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      The cheat isn't a feature, it is a shortcut. When I did "new HttpClient()", I really should have pulled that from a HttpClientFactory that I had set up. Otherwise, the app could clog up my connections to the Internet. You can find out more about how to do it right here: th-cam.com/video/cwgck1k0YKU/w-d-xo.html

    • @devcisse9425
      @devcisse9425 4 ปีที่แล้ว

      @@IAmTimCorey Oh. I thought it was something that can be enabled from VS. I love the hint

  • @bobweiram6321
    @bobweiram6321 3 ปีที่แล้ว

    Can the CORS policy be set in a config file instead of startup?

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      You can put the settings in a config, but they still need to be set in the Startup.

  • @arturkyulyan
    @arturkyulyan 4 ปีที่แล้ว

    Thanks for tutorial. What if we do some changes in Web API project (like adding new action) and we need these changes to be adopted in the client projects? Do we need to repeat the same steps to update auto-generated C# code?
    Thanks.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Yes, but typically you do not want to change production API code like that. This is why we have versions. Otherwise, you would break all of your clients, some of which you may not control.

  • @yohanesjohn99
    @yohanesjohn99 4 ปีที่แล้ว

    Wew! This is great tutorial!
    so easily to catch up
    even for beginners for me

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Glad it was helpful!

  • @kevingates5851
    @kevingates5851 3 ปีที่แล้ว

    Hi Tim, Do you have a video or suggestion resource about how to implement versioning wisely? I have found the [ApiVersion] data annotation as a concept, but I'm personally having a hard time finding documentation for .Net 5. I may not be searching the right terms, but I'd love to learn. Or if you have a paid course touching on this, please let me know. Thank you very much!

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      I haven’t covered it yet but it is a priority to cover.

  • @cavinrauch
    @cavinrauch 3 ปีที่แล้ว

    What extensions are you using in vs ?
    Specifically the extension that displays the parameter names

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว +2

      That's built into Visual Studio now. I try hard not to use extensions. I believe the only one I am using is one to change the font size. Here's how to get those inline parameter names: th-cam.com/video/f0YeVirKPfw/w-d-xo.html

    • @cavinrauch
      @cavinrauch 3 ปีที่แล้ว +1

      ​@@IAmTimCorey Thank you so much! Super awesome little feature they added that I missed.
      While I was there I also found IntelliSense's "Show items from unimported namespaces" option, another thing I wish I found sooner.
      But thanks so much for the amazing videos! Wouldn't be where I am today without half of them

  • @Ahmedhosnybarbary
    @Ahmedhosnybarbary 3 ปีที่แล้ว

    Excellent

  • @nikhil-ns5jn
    @nikhil-ns5jn 4 ปีที่แล้ว

    this tutorial is really helpful can you please make a video on Azure pipelines

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Check out these videos - th-cam.com/users/IAmTimCoreysearch?query=devops

  • @davidmil15
    @davidmil15 4 ปีที่แล้ว +2

    It’s funny how swagger/opeapi is catching up to the features we had in SOAP 10 years ago lol.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Yeah, it is bringing back some of the good parts.

  • @danielvillalba4457
    @danielvillalba4457 4 ปีที่แล้ว

    Hi, great video as always, just small doubt, what about if we want to use dependency injection to provide the 'swaggerClient' class instead of use the new operator, is the OpenAPI provides with an interface or do we have to register the class directly ?
    Thanks a lot in advance
    Regards
    Daniel

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You can tell it to generate an interface as well.

  • @StudentCompanion
    @StudentCompanion 4 ปีที่แล้ว +1

    Great stuff! this is really wonderful and highly appreciated.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Glad it was helpful!

  • @nagasreekakubal3897
    @nagasreekakubal3897 3 ปีที่แล้ว

    Hi Tim, I am getting "Not found" error when one webAPI calling another WebAPI and both are hosted in IIS as applications under Default Web Site. I am able to run and test them individually without any issues using postman. It works fine in debug mode too. I even tried adding Cors. Could you please point me to the right direction?

  • @stewarthyde5111
    @stewarthyde5111 4 ปีที่แล้ว

    One thing I am curious about is best practices when converting .Net Core 3.1 and even .Net Frameworks to .Net 5.0. I attempted to directly change .Net core 3.1 Blazor Webassembly project and it came up with errors with some of classed and also because .Net Standard

    • @stewarthyde5111
      @stewarthyde5111 4 ปีที่แล้ว

      I believe part of issue was compile change - it thought one of classes was a name space

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I'll probably do a video on upgrading from .NET Core 3.1 to .NET 5.

  • @wayahedia9989
    @wayahedia9989 4 ปีที่แล้ว

    I didn't understand it.. but I enjoyed it. !

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Practice what you see. It will help you grasp the concepts. That's what I do.

    • @wayahedia9989
      @wayahedia9989 4 ปีที่แล้ว

      @@IAmTimCorey agree! I am a desktop/embedded developer and haven't done a lot of web stuff. Save for a few PHP sites in 2009. I am on a path to find out how to , or if I can control HID and BLE devices from a browser. I'd like to surprise my client with a browser version of some of the features of the app I am developing.

  • @TheMiamiVice27
    @TheMiamiVice27 4 ปีที่แล้ว

    Hello Tim! Great video as usual. I have one question.
    We use Odata extensively in our API projects. Is there a way to generate OData service specification (like swagger.json in this video) and then use it config file,or shall I say, schema description, to generate a client for instance in Angular (JS) client app ?
    Or even better, is there a way to use swagger to generate OData service schema(description) ?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I'm not sure about that.

  • @fidel_soto
    @fidel_soto 3 ปีที่แล้ว

    So they added swagger to WebAPI? Got it.

  • @AndrewsVideosOnUTube
    @AndrewsVideosOnUTube 3 ปีที่แล้ว

    If you get a build error when you use Connected Services to create the Swagger Client, make sure that you are using the latest NSwag.ApiDescription.Client NuGet package. That fixed my error.

  • @jamesbest2221
    @jamesbest2221 4 ปีที่แล้ว

    Awesome! Thank you!!

  • @viktoralferov2874
    @viktoralferov2874 4 ปีที่แล้ว

    greetings. thank you. very informative and useful

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Glad it was helpful!

  • @embossCoder
    @embossCoder 3 ปีที่แล้ว

    Thank you

  • @hugogogo13
    @hugogogo13 4 ปีที่แล้ว

    Thank you for the presentation. Basically it's .Net Core 3 with swagger already installed. I was expecting more out of it tbh.. Especially because generated code usually makes inefficient solution on large projects. Disappointed, I'll stick to core 3 for now

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      That Open API is a standard that APIs even outside of .NET are using. It is the primary way to communicate your API's contract, so it is a big deal that it is already integrated. You can integrate it manually into a .NET Core 3 project (and you should). Also, don't forget that .NET 5 has massive speed improvements over .NET Core 3 and 3.1.

    • @hugogogo13
      @hugogogo13 4 ปีที่แล้ว

      @@IAmTimCorey okay, will look into these speed improvements then, thank you

  • @MultiLeechCZ
    @MultiLeechCZ 4 ปีที่แล้ว

    What i would like to see gRPC-Web as connected service with WASM tutorial. :) Also how did u make this new( baseurl: "") thing ? i mean how is that baseurl showing automatically in the call ? Normally it is not happening

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I noted your recommendation and have added to my list, thanks.

  • @jpchauny108
    @jpchauny108 4 ปีที่แล้ว

    Great tutorial. Thank you !

  • @feelingeverfine
    @feelingeverfine 4 ปีที่แล้ว

    Will you go over (1) how to generate openapi client without Visual Studio (for Mac users) and (2) NSwag.MSBuild on auto generating clients?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Nope, I'm not going that deep. I'm just introducing the topic. I may go deeper in another video.

  • @HugRunner
    @HugRunner 4 ปีที่แล้ว

    If you were to connect the OpenAPI connected service using URL to the API URL where the swagger.json file is generated instead, would the generated client auto-update on build or is it a manual process to fetch from the URL each time you want to update?
    Also, I guess there are resources/documentation out there to configuring NSwag, but I think it would have been nice if you at least showed in this video how you would go about fixing the DateTimeOffset to DateTime, just to show that it's no big deal, instead of just skipping it and in a way implying that it would take a lot of time so not worth covering in this video.

  •  4 ปีที่แล้ว

    Thank you, Tim!
    I have a question to improve development experience;
    Yea, Swagger is great! As a mobile developer, I need that auto-generated doc badly and most backend developers just skip it. But, while I developing a backend with dotnet with watch option I have trouble; every time dotnet restarts itself because of a change of a file Swagger page also refreshes itself. That seems nice at the beginning but you lose all of the form data you have in Swagger. So, you must re-write every data every time. That is pretty frustrating. Does anybody have a solution for that? It should keep the form data after refreshing or auto-refresh can be disabled.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      The developers are working on a better version of watch that is built into Visual Studio. Right now, though, there is not a better solution.

    • @Ankhtepot
      @Ankhtepot 3 ปีที่แล้ว

      Use Postman could maybe help you with this? At least to keep entered form data.

  • @theobellash6440
    @theobellash6440 4 ปีที่แล้ว +2

    I like your videos MOSH but one suggestion, please make short videos because we always don't have enough time to play your videos. Please make 10 minutes videos or less than 20

    • @hashimkz
      @hashimkz 4 ปีที่แล้ว

      Just watch half of it at a time? Or at 2x speed?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +4

      I work hard to provide real-world context so that you can take what you learn and apply it to the real world right away. That takes time.

    • @mcorplab2719
      @mcorplab2719 4 ปีที่แล้ว

      Just watch it in 10 minutes chunks buddy. :)

  • @КириллТимофеев-ш4к
    @КириллТимофеев-ш4к 4 ปีที่แล้ว +1

    It's like good old wsdl :D In 2020 history kinda make a loop :D

  • @sheikhbashar1
    @sheikhbashar1 4 ปีที่แล้ว

    Greate tutorial, thank you so much

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You're very welcome!

  • @michelchaghoury870
    @michelchaghoury870 4 ปีที่แล้ว

    Hy, As Always I have A question here we have only to projects, not a big problem but if I have multiple projects that get data from the web API(OpenApi/Swagger), I need to add that JSON file in all the projects that will make HttpCalls if I have to change my swagger setting now I have to change them in all my other projects I there a way to solve that issue? and tnx a lot for your work

    • @pilotboba
      @pilotboba 4 ปีที่แล้ว

      You can add after build events to your projects so when it builds, it does more stuff. This can generate your clients.
      Take a look at github.com/jasontaylordev/CleanArchitecture for some examples of a template that does some of this stuff.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Well, if you are changing your API then it would make sense that you are changing your clients that rely on your API. Now if you created a class library that talked to the API and your multiple projects used that same class library, it would be much easier to update everything. That's why we typically do not update an API once it is in production (except bug fixes). Instead, we create a new version so that new clients can get the new stuff and we don't break the old clients. Since the old clients use the v1 json file, nothing will change.

    • @michelchaghoury870
      @michelchaghoury870 4 ปีที่แล้ว

      @@IAmTimCorey tnx alott

    • @pilotboba
      @pilotboba 4 ปีที่แล้ว

      @@IAmTimCorey I see this is an issue more for two circumstances:
      1. Your still in dev, and the API endpoints are very much in flux.
      2. This is a private API that only your client side apps use, and not something you publish for public consumption.
      Some people say, never version your API, it's a new API. Some people say version one any change. Some say only version on a breaking change, etc.
      It's adult diapers all around. (depends)

  • @jimlynch8313
    @jimlynch8313 4 ปีที่แล้ว +1

    For anyone trying this and getting an error on Building BlazorWasmDemo you may need to update your NuGet packages (NSwag.ApiDescription.Client 13.0.5 > 13.9.4 as of this comment; Microsoft.Extensions.ApiDescription.Client 3.0.0 > 5.0.0 as of this comment)

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Interesting. Did you make sure your Blazor WASM project was .NET 5 and not .NET Core 3.1?

    • @jimlynch8313
      @jimlynch8313 4 ปีที่แล้ว

      @@IAmTimCorey I did. I even tested against your source code to verify I didn't miss anything. Although, I seem to remember someone once said it's not a bad idea to update NuGet packages if it's a new project.
      By chance, could you have been running VS 16.8.1? I used 16.8.2 (released on Nov. 19) and this could have been something that was affected in the update, though I don't see anything about this specifically on the patch notes page.

    • @luisc1794
      @luisc1794 4 ปีที่แล้ว

      I couldn't see the file swaggerClient.cs in obj folder, this helps me

  • @scott98390
    @scott98390 3 ปีที่แล้ว

    I don't understand why you say that the *HttpClient* is managed by *HttpClientFactory* - it looks to me like when you call *builder.services.AddScoped()* you're just newing up a new client for each request, and the factory is not involved. I'd love to see a tutorial on the right way to use *HttpClient* and *HttpClientFactory.*

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว +1

      The factory operates behind the scenes for that scoped call, but yes, it is a bit of a black box. I'm adding it to my suggestion list for a future video.

  • @haizzengunn9350
    @haizzengunn9350 3 ปีที่แล้ว

    nice

  • @damianrecinski7329
    @damianrecinski7329 4 ปีที่แล้ว +1

    Blazor default layout is terrible.. Gradients were popular in 2010..

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      It is meant to show you what could be done. It will always be on you to develop what you really want, so who cares what the starting point is?

    • @carlosjosejimenezbermudez9255
      @carlosjosejimenezbermudez9255 4 ปีที่แล้ว

      They are getting popular again in case you haven't noticed. Maybe not the way they implemented it though.

    • @sglasgowaz
      @sglasgowaz 4 ปีที่แล้ว

      Create your own default template instead of using the default? I mean, seriously, are you upset Tim just ran with the default or that the base template for Blazor isn't what you like? Tim's demos are meant to be exactly what the default is for anyone wanting to code along. You may as well say apples are terrible.

    • @damianrecinski7329
      @damianrecinski7329 4 ปีที่แล้ว

      @@sglasgowaz I dont get your point. I wasn't referring to Tim's video, but to Blazor directly. I just think, that showing default template with such a poor appearance isn't the best way to convince ppl to use it. If you start new asp.net mvc5 app, default template is acceptable, even so it was created many years ago.

  • @LuigiZambetti
    @LuigiZambetti 4 ปีที่แล้ว +1

    Sad case that Microsoft doesn’t want to pursue WCF technology.

    • @kblyr
      @kblyr 4 ปีที่แล้ว +1

      In my experience, It's hard to make a working WCF service

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      I know there are a lot of people who want WCF. Fortunately, Microsoft gave away their source code and an independent team is working on a .NET Core implementation of WCF.

    • @pilotboba
      @pilotboba 4 ปีที่แล้ว +1

      Yes, the are moving forward with gRPC like most other platforms.

  • @anatoliytkachenko1498
    @anatoliytkachenko1498 4 ปีที่แล้ว

    like

  • @DenisBabarykin
    @DenisBabarykin 3 ปีที่แล้ว

    Вот блин, самый популярный влоггер со специализацией по туториалам в интернете, но качество каждый раз ниже ожиданий. Постоянно ухожу с его видео разочарованным по нескольким причинам:
    - нет краткого описания содержания видео в начале
    - видео каждый раз затянуты
    - мусолятся несущественные для темы видео аспекты
    - нет глубокого погружения в технологию, описания каких-либо подводных камней
    В итоге каждый раз одно расстройство зря потраченным временем.

  • @Esico6
    @Esico6 4 ปีที่แล้ว

    Every year its different. You have to use this or that. Not liking that anymore.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I'm not sure what you see as a change. There are upgrades, but nothing that requires you to even do anything. If you totally ignored Swagger, it would not be in your production app and you would not need to do anything to test out your app on F5. Nothing was taken away. You also have the checkbox when creating the app to not include OpenAPI (Swagger).

    • @flogginga_dead_horse4022
      @flogginga_dead_horse4022 4 ปีที่แล้ว

      yep 20 years, every year or two change everything lol

  • @SayWhaaaaaaaaaaaaaaaaaaaaaaat
    @SayWhaaaaaaaaaaaaaaaaaaaaaaat 4 ปีที่แล้ว

    Nonsense... why da hell they include all that crap like TRY IT OUT..and so on?? install Postman and try it..why api have so much junk in it? Yes it's nice to have documentation, but ability to do request and so on-dumb.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You aren't fighting Microsoft here, you are fighting the industry. This is an industry standard way of presenting an API "which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic." ( spec.openapis.org/oas/v3.0.3 ). This allows for simple understanding of the API, including seeing how it works, without the need for third-party systems. This is not a Microsoft thing. It is how the industry decided to document APIs in a uniform manner.