Generate OpenApi (Swagger) Angular client API library & stop maintaining APIs in your Angular app!

Sdílet
Vložit
  • čas přidán 11. 09. 2024
  • Learn how to leverage the power of OpenApi Codegen to generate Angular client API library and how to use that library in your Angular app.
    Stop wasting hours in maintaining API code in the Angular app and dealing with object mappings and bug-prone development.
    This video focuses on Angular client but there are dozens of languages/frameworks that OpenApi Codegen supports.
    Please Like this video and Subscribe to my channel in order to support me in creating more tutorials like this.
    Please feel free to comment on the video if you have any questions, or if you'd like me to do a tutorial on anything.
    Helpful Links:
    Swagger / OpenApi Docs: swagger.io/doc...
    OpenApi CodeGen setup: github.com/Ope...
    GitHub Repo: github.com/tec... (Branch: tutorial-openapi)
    Nx (Nrwl) : nx.dev/l/a/get...

Komentáře • 36

  • @IhorKhomiak
    @IhorKhomiak Před 26 dny

    Thanks for the useful video. There are not so many videos on CZcams about OpenAPI. So this is the brilliant one!

    • @techtacious
      @techtacious  Před 24 dny

      Glad I could help. Thanks for watching!

  • @expansiondigital
    @expansiondigital Před 2 lety +7

    Excellent explanation, there is almost nothing explaining openapi and Angular. Thanks for your contribution.

    • @techtacious
      @techtacious  Před 2 lety

      I'm glad I could help. :)
      Please feel free to post suggestions for topics you'd like to see on this channel.
      Happy coding!

  • @sudharsanreddy8631
    @sudharsanreddy8631 Před 2 lety +3

    This is amazing tutorial to start with openapi client in angular, thanks :)

  • @gavarniwinter6045
    @gavarniwinter6045 Před rokem +1

    Hands down best video on this subject all these other videos of annoying nerds posting things we not interested in i dont wanna install 1000 other dependencies / tools for a code gen.

    • @techtacious
      @techtacious  Před rokem

      Thanks a lot! I'm glad you found it useful.

  • @unimatrix20a
    @unimatrix20a Před 19 dny

    thanks for the great video. any idea if this also works with angular standalone components (where we dont have app.module.ts). I am struggling about how to plug it in in this scenario.

  • @user-vq7lv3bn6z
    @user-vq7lv3bn6z Před 3 měsíci +1

    thanks for your contribute very much

  • @tijanimiracle90
    @tijanimiracle90 Před rokem +1

    god will bless you this really help me alot today

    • @techtacious
      @techtacious  Před rokem

      I'm glad I was able to help. Happy coding! 🙂

  • @mahboubehmaleklou4083
    @mahboubehmaleklou4083 Před 11 měsíci

    thank you for this video , i suscribed you for future tutorial ... good luck

  • @robertkameni5975
    @robertkameni5975 Před 9 měsíci +1

    Great Video✌

    • @techtacious
      @techtacious  Před 9 měsíci

      Thank you and thanks for watching!

  • @nvelchev
    @nvelchev Před 11 měsíci

    Hi Sahaj,
    Great video! Thanks for sharing it.
    I have a question.
    What if I have more than one client? In a microservice project, we have different clients for the different microservices. I see that the instance of the ConfigurationParams is coming from a specific client that you built. How I can pass the same configuration to all clients instead of repeating the same code N times using the objects from each client?

  • @ellen9427
    @ellen9427 Před 2 lety +1

    hello, I want to use the open API, but my project is in QT, if I just use the .yaml file in my project without the settings you made in libs/openapi will it work? or it only works with settings made in libs/openapi???????
    URGENT

    • @techtacious
      @techtacious  Před rokem

      Ideally it should work but you may need some configurational settings specific to QT. I havent really worked with QT so I can't be sure.

  • @shahidullah2775
    @shahidullah2775 Před rokem

    Error: 'java' is not recognized as an internal or external command

  • @ebichu8126
    @ebichu8126 Před 2 lety +1

    Thanks a lot!

  • @kartikkanwar91
    @kartikkanwar91 Před 2 lety +1

    awesome!

    • @techtacious
      @techtacious  Před 2 lety

      I'm glad I could help. :)
      Please feel free to post suggestions for topics you'd like to see on this channel.
      Happy coding!

  • @manasipalkar9794
    @manasipalkar9794 Před 6 měsíci

    I m trying to see if I can generate the angular code from swagger without dropping sonar cube analysis

    • @techtacious
      @techtacious  Před 3 měsíci

      I'm not sure why you would need to drop sonarcube analysis. The analysis should work on any code.

  • @MobiFarmer
    @MobiFarmer Před 2 lety +2

    best

    • @techtacious
      @techtacious  Před 2 lety +1

      I'm glad I could help. :)
      Please feel free to post suggestions for topics you'd like to see on this channel.
      Happy coding!

  • @sickboy1776
    @sickboy1776 Před rokem

    Great tutorial, thank you for your effort. I have a question about implementing micro services backend architecture, how do you implement and generate multiple swagger spec jsons when you a separate swagger for each of them?

    • @techtacious
      @techtacious  Před rokem +1

      Thank you!
      I recommend using Nx to maintain a monorepo. Every microservice can have its own swagger spec file. The file can either live somewhere in the microservice directory itself, or you can have a separate folder in the monorepo and call it swagger, and place all spec files there.
      You can then leverage Nx to have a command in your microservice's workspace.json, that would generate the swagger library using the respective microservice swagger spec file. The command would basically call a script that would find the associated swagger spec file for the microservice (have a naming convention) and run the respective codegen command to generate the client library for the microservice.

    • @sickboy1776
      @sickboy1776 Před rokem +1

      @@techtacious This was what i was looking for... Thanks!

  • @firecape8822
    @firecape8822 Před rokem

    Thank you...really appreciate it. How would I have my .NET core api generate a yaml file from an API I already have?

    • @techtacious
      @techtacious  Před rokem

      No worries, thanks for watching!
      I have never worked with .NET but I'm sure there would be documentation regarding this on Openapi / Swagger's website.

  • @hadirahmani7943
    @hadirahmani7943 Před 2 lety

    please increase font size in your screen :(

    • @techtacious
      @techtacious  Před 2 lety

      Hi Hadi! Apologies for the small font size. I am aware of the problem and I will take care of it in my future videos. Thanks for your comment!