Swagger API Documentation with Swaggo in Golang

Поділитися
Вставка
  • Опубліковано 9 лют 2025

КОМЕНТАРІ • 16

  • @kahleryasla
    @kahleryasla Місяць тому

    Hocam o tatli aksaninizdan direkt Turk oldugunuzu anladim :D
    Harika bir video olmus direkt kanali takibe aldim.
    Cok tesekkurler

    • @mfkintech
      @mfkintech  Місяць тому

      ben teşekkür ederim, aksanım direkt belli oluyor evet :D

  • @shivamgour9610
    @shivamgour9610 11 місяців тому

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

  • @ShahzadHaider-e2d
    @ShahzadHaider-e2d 6 місяців тому

    I've followed each step, but I am getting this error in Swagger dashboard:
    No operations defined in spec!

    • @mfkintech
      @mfkintech  4 місяці тому

      Hi, there can more than one reason why you face this error. it can be about:
      It can be missing or incorrect Swagger annotations on the API endpoints. or Swagger file not generated properly. or Swagger can't find the spec file. You can check these and if these doesn't work, check out the codebase from my GitHub and compare with yours.
      these are the solutions that come to my mind, hope you can resolve it

  • @thinnyofficial5688
    @thinnyofficial5688 10 місяців тому

    wow good bro.

  • @VinothKumarBalasubramanian
    @VinothKumarBalasubramanian 8 місяців тому

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

    • @mfkintech
      @mfkintech  7 місяців тому

      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 9 місяців тому

    Is there a way to change the swagger icon?

    • @mfkintech
      @mfkintech  8 місяців тому

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

  • @tanawatketkaew5871
    @tanawatketkaew5871 6 місяців тому

    I used try along your way but it cannot set many examples

    • @mfkintech
      @mfkintech  4 місяці тому

      hi, I don't know the error you face but maybe you can access the code from my GitHub, and start the edit code from there.
      and sorry for the late response

  • @igboanugwocollins4452
    @igboanugwocollins4452 10 місяців тому

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

    • @mfkintech
      @mfkintech  10 місяців тому

      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