Generate swagger specification from Go source code

Pedram Hajesmaeeli
Jun 29 · 8 min read
Created using
A glance at a sample swagger documentation
How each endpoint will look like with Swag
A sample endpoint
Output of meta annotation
docs of foobar endpoint
GO111MODULE=off go get -u
Result of running make servce-swagger

Pedram Hajesmaeeli

Written by

I’m a passionate software engineer, opting for delivery of maintainable, reliable software that also meets the deadlines.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade