Swagger API Documentation with Swaggo in Golang
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
Amazing video man, It's very helpful to me : )
thanks :)
wow good bro.
thanks :)
Awesome video, can we auto generate without putting the swagger in each endpoint
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
Is there any way to provide route path in @Router as a variable ?
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
Is there a way to change the swagger icon?
hi @verdisasmeka8114 I have looked at the documentation but couldn't find a way :/ sorry.