Files
goGin/scripts/generate_swagger.sh
Beyhan Oğur 2a5b661443 first commit
2026-04-26 21:46:42 +03:00

16 lines
356 B
Bash

#!/usr/bin/env bash
# Regenerate swagger docs reliably. Run from project root.
set -euo pipefail
# Ensure swag is installed
if ! command -v swag >/dev/null 2>&1; then
echo "swag not found. Install: go install github.com/swaggo/swag/cmd/swag@latest"
exit 1
fi
# Generate docs
swag init -g main.go -o docs
echo "Swagger docs regenerated into ./docs"