backend api, swagger, tooling, frontend skeleton
This commit is contained in:
14
backend/scripts/gen_swagger.sh
Normal file
14
backend/scripts/gen_swagger.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
|
||||
SWAG_BIN="${SWAG_BIN:-/tmp/go/bin/swag}"
|
||||
if [ ! -x "${SWAG_BIN}" ]; then
|
||||
echo "swag introuvable: ${SWAG_BIN}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "${ROOT_DIR}"
|
||||
"${SWAG_BIN}" init -g cmd/app/main.go -o docs
|
||||
Reference in New Issue
Block a user