first commit
This commit is contained in:
15
scripts/generate_swagger.sh
Normal file
15
scripts/generate_swagger.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/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"
|
||||
|
||||
Reference in New Issue
Block a user