Swagger API Documentation with Swaggo in Golang

Sdílet
Vložit
  • čas přidán 19. 06. 2024
  • 🚀 Dive into the world of efficient API documentation with my latest tutorial! In this video, I'll walk you through the process of using Swaggo, a powerful library for Go (Golang), to create comprehensive Swagger documentation for your APIs.
    Chapters:
    00:00 Introduction
    00:30 Swaggo library
    02:34 Fiber integration
    05:28 GET endpoint documentation
    08:36 POST endpoint documentation
    🔍 What You'll Learn:
    Understanding the basics of Swaggo and Swagger.
    Step-by-step instructions on integrating Swaggo into your Go project.
    Best practices for generating and customizing your Swagger documentation.
    Tips and tricks to enhance your API documentation process.
    📚 Resources and Links:
    Github source code: github.com/MehmetFiratKomurcu...
    Swaggo: github.com/swaggo/swag
    Swagger UI demo: petstore.swagger.io/
    💬 Stay Connected:
    Linkedin: / mehmetfiratkomurcu
    Twitter: / mfkintech
    Blog: firatkomurcu.com/
    Github: github.com/MehmetFiratKomurcu
    👍 If you find this video helpful, don't forget to like, subscribe, and share it with your fellow developers. Your support encourages me to create more content like this!
    #GoLang #Swaggo #Swagger #APIDocumentation #ProgrammingTutorial #Coding #SoftwareDevelopment #WebDevelopment
  • Věda a technologie

Komentáře • 10

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

    Amazing video man, It's very helpful to me : )

  • @thinnyofficial5688
    @thinnyofficial5688 Před 2 měsíci

    wow good bro.

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

    Awesome video, can we auto generate without putting the swagger in each endpoint

    • @mfkintech
      @mfkintech  Před 2 měsíci

      Hi, for Swaggo library, you need to specify for each endpoint. I think there was a library that can do that but it had a cons. I researched it but couldn't find the library :( If I can find it, I will reply to here again

  • @VinothKumarBalasubramanian

    Is there any way to provide route path in @Router as a variable ?

    • @mfkintech
      @mfkintech  Před dnem

      Hi, Swagger is a static ui actually, and I think setting the route with a variable make the api non-consistent, so I think you can't do that.
      If you are talking for getting id or something like that, then yes, you can.
      example:
      // @Router /orders/{id} [get]
      app.Get("/orders/:id", func(ctx *fiber.App)...
      hope I understand it correctly, if not, we can discuss further.
      thanks

  • @verdisasmeka8114
    @verdisasmeka8114 Před měsícem

    Is there a way to change the swagger icon?

    • @mfkintech
      @mfkintech  Před měsícem

      hi @verdisasmeka8114 I have looked at the documentation but couldn't find a way :/ sorry.