June 10, 2018

Serve SwaggerUI within your Golang application

I’ve previously written an Article on generating OpenAPI (Swagger) spec automatically within Golang. It’s the most popular article on this blog since lots of developers are searching for it. In it, I mentioned that in order to serve the swagger.json with SwaggerUI, a Docker instance is required that will serve SwaggerUI. There is an easier way to implement it, and this article will demonstrate how to do it with net/http, Gin and Echo. Read more

January 4, 2018

Create Golang API documentation with SwaggerUI

Having a documentation for you your APIs is more useful than you might be thinking. Even if you don’t expose your APIs publicly, having the docs for your frontend or mobile team is way easier than sending them screenshots/snippets or using a paid product like Postman/Insomnia (premium version with syncing). With SwaggerUI, you can get a well-designed documentation for all your APIs automatically. When moving to Go I had issues setting it up, due to lacking documentation/tutorials, so I decided to write one. Read more

2018 © Emir Ribic - Some rights reserved; please attribute properly and link back. Code snippets are MIT Licensed

Powered by Hugo & Kiss.