File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 15
15
- uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
16
16
with :
17
17
go-version-file : go.mod
18
+ - name : Install swag
19
+ run : go install github.com/swaggo/swag/v2/cmd/swag@latest
18
20
- run : ./cmd/help/verify.sh
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e
3
3
4
- # Verify that generated Markdown docs are up-to-date.
4
+ # Verify that generated CLI docs are up-to-date.
5
5
tmpdir=$( mktemp -d)
6
6
go run cmd/help/main.go --dir " $tmpdir "
7
7
diff -Naur -I " ^ date:" " $tmpdir " docs/cli/
8
+
9
+ # Generate API docs in temp directory that mimics the final structure
10
+ api_tmpdir=$( mktemp -d)
11
+ mkdir -p " $api_tmpdir /server"
12
+ swag init -g pkg/api/server.go --v3.1 -o " $api_tmpdir /server"
13
+ # Exclude README.md from diff as it's manually maintained
14
+ diff -Naur --exclude=" README.md" " $api_tmpdir /server" docs/server/
15
+
8
16
echo " ######################################################################################"
9
17
echo " If diffs are found, please run: \` task docs\` to regenerate the docs."
10
18
echo " ######################################################################################"
You can’t perform that action at this time.
0 commit comments