Description
Currently, our Gin-based Go backend lacks an automated way to sync API implementation with documentation. This leads to friction between backend and frontend development, as manual documentation often lags behind code changes.
To resolve this, we need to integrate swag (swaggo) to automatically generate OpenAPI 2.0/3.0 specifications directly from our Gin handler comments. This ensures that our API contracts remain the single source of truth.
Proposed solution
We will use the swaggo/swag CLI tool along with the gin-swagger middleware to generate and serve documentation.
Description
Currently, our Gin-based Go backend lacks an automated way to sync API implementation with documentation. This leads to friction between backend and frontend development, as manual documentation often lags behind code changes.
To resolve this, we need to integrate swag (swaggo) to automatically generate OpenAPI 2.0/3.0 specifications directly from our Gin handler comments. This ensures that our API contracts remain the single source of truth.
Proposed solution
We will use the swaggo/swag CLI tool along with the gin-swagger middleware to generate and serve documentation.