first commit
This commit is contained in:
17
script/swag/build.sh
Normal file
17
script/swag/build.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
file_path=$(
|
||||
cd "$(dirname "$0")" || exit
|
||||
pwd
|
||||
)/../..
|
||||
|
||||
echo $file_path
|
||||
|
||||
#projectPath = $(dirname $(dirname "$PWD"))
|
||||
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo 'ERROR: undefined version
|
||||
please input gateway version, example: ./build.sh v1'
|
||||
else
|
||||
swag init -d $file_path/gateway/api/$1/ -g internal/handler/routes.go -o $file_path/gateway/api/$1/docs/
|
||||
fi
|
||||
Reference in New Issue
Block a user