Skip to content

Commit 7cff655

Browse files
committed
Fix swag command line continuation and formatting
Correct the bash line continuation syntax to match the original script. The issue was double backslashes instead of single backslashes for line continuation, which caused the swag command to fail. The script now works correctly when run from the repository root. Co-authored-by: sreya <4856196+sreya@users.noreply.github.com>
1 parent 3a54e51 commit 7cff655

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/apidocgen/generate.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ trap cleanup EXIT
1717

1818
log "Use temporary file: ${API_MD_TMP_FILE}"
1919

20-
pushd "${PROJECT_ROOT}/coderd"
21-
go run github.com/swaggo/swag/cmd/swag@v1.8.9 init \\
22-
--generalInfo="coderd.go" \\
23-
--dir=".,../codersdk,../enterprise/coderd,../enterprise/wsproxy/wsproxysdk" \\
24-
--output="./apidoc" \\
25-
--outputTypes="go,json" \\
26-
--parseDependency=true
20+
pushd "${PROJECT_ROOT}"
21+
go run github.com/swaggo/swag/cmd/swag@v1.8.9 init \
22+
--generalInfo="coderd.go" \
23+
--dir="./coderd,./codersdk,./enterprise/coderd,./enterprise/wsproxy/wsproxysdk" \
24+
--output="./coderd/apidoc" \
25+
--outputTypes="go,json" \
26+
--parseDependency=true
2727
popd
2828

2929
pushd "${APIDOCGEN_DIR}"

0 commit comments

Comments
 (0)