add api_build all group
This commit is contained in:
parent
aba7ccc6a8
commit
70c1efa126
27
Web/api_build/build_all.bat
Normal file
27
Web/api_build/build_all.bat
Normal file
@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
CHCP 65001
|
||||
|
||||
set dir=%~dp0
|
||||
|
||||
set apiServicesPath=%dir%..\src\api-services\
|
||||
|
||||
if exist %apiServicesPath% (
|
||||
echo ================================ 删除目录 api-services ================================
|
||||
rd /s /q %apiServicesPath%
|
||||
)
|
||||
|
||||
echo ================================ 开始生成 api-services ================================
|
||||
|
||||
java -jar %dir%swagger-codegen-cli.jar generate -i http://localhost:5005/swagger/All%20Groups/swagger.json -l typescript-axios -o %apiServicesPath%
|
||||
|
||||
@rem 删除不必要的文件和文件夹
|
||||
rd /s /q %apiServicesPath%.swagger-codegen
|
||||
del /q %apiServicesPath%.gitignore
|
||||
del /q %apiServicesPath%.npmignore
|
||||
del /q %apiServicesPath%.swagger-codegen-ignore
|
||||
del /q %apiServicesPath%git_push.sh
|
||||
del /q %apiServicesPath%package.json
|
||||
del /q %apiServicesPath%README.md
|
||||
del /q %apiServicesPath%tsconfig.json
|
||||
|
||||
echo ================================ 生成结束 ================================
|
||||
28
Web/api_build/build_all.sh
Normal file
28
Web/api_build/build_all.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
currPath=$(pwd)
|
||||
parentPath=$(dirname "$currPath")
|
||||
apiServicesPath=${parentPath}/src/api-services/
|
||||
|
||||
echo "================================ 生成目录 ${apiServicesPath} ================================"
|
||||
|
||||
# 判断目录是否存在
|
||||
if test -d "$apiServicesPath"; then
|
||||
echo "================================ 删除目录 api-services ================================"
|
||||
rm -rf "${apiServicesPath}"
|
||||
fi
|
||||
|
||||
echo "================================ 开始生成 api-services ================================"
|
||||
|
||||
java -jar "${currPath}"/swagger-codegen-cli.jar generate -i http://localhost:5005/swagger/All%20Groups/swagger.json -l typescript-axios -o "${apiServicesPath}"
|
||||
|
||||
rm -rf "${apiServicesPath}".swagger-codegen
|
||||
rm -f "${apiServicesPath}".gitignore
|
||||
rm -f "${apiServicesPath}".npmignore
|
||||
rm -f "${apiServicesPath}".swagger-codegen-ignore
|
||||
rm -f "${apiServicesPath}"git_push.sh
|
||||
rm -f "${apiServicesPath}"package.json
|
||||
rm -f "${apiServicesPath}"README.md
|
||||
rm -f "${apiServicesPath}"tsconfig.json
|
||||
|
||||
echo "================================ 生成结束 ================================"
|
||||
Loading…
Reference in New Issue
Block a user