#!/usr/bin/env bash # Regenerates static API browser under docs/api/generated (ReDoc + spec path). set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" GEN="$ROOT/docs/api/generated" SPEC_SRC="$ROOT/docs/api/api-specification.yaml" mkdir -p "$GEN" if [[ -f "$SPEC_SRC" ]]; then cp -f "$SPEC_SRC" "$GEN/api-specification.yaml" fi cat > "$GEN/index.html" << 'HTMLEOF'