Skip to main content
  1. Tags/

Tutorial

Auto-Generate OpenAPI and Swagger UI in Go with Rivaas

Keeping an OpenAPI file up to date by hand is slow and easy to get wrong. Your code changes, but the spec does not, and clients stop trusting the docs. Rivaas helps by building the OpenAPI document when your app runs. You describe each route next to the handler, and your Go types become JSON Schema in the spec. This tutorial shows a small working API and where to open Swagger UI.

Getting Started with Rivaas in 5 Minutes

··2 mins
Most Go web frameworks make you choose between simplicity and production features. With Rivaas, you get both. In this tutorial, you’ll build a REST API with automatic OpenAPI documentation, health probes, and interactive Swagger UI — all in under 5 minutes. Prerequisites # Go 1.25 or later A terminal and your favorite editor Step 1: Create Your Project # mkdir rivaas-quickstart && cd rivaas-quickstart go mod init example.com/quickstart go get rivaas.dev/app go get rivaas.dev/openapi Step 2: Write Your First Handler # Create main.go: