scripts, Documentation: fix swagger generation
Changes to the genproto to support splitting out the grpc-gateway broke swagger generation.
This commit is contained in:

committed by
Gyu-Ho Lee

parent
998fa0de76
commit
0e90e504f5
@ -68,6 +68,8 @@ for dir in ${DIRS}; do
|
||||
popd
|
||||
done
|
||||
|
||||
# remove old swagger files so it's obvious whether the files fail to generate
|
||||
rm -rf Documentation/dev-guide/apispec/swagger/*json
|
||||
for pb in etcdserverpb/rpc api/v3lock/v3lockpb/v3lock api/v3election/v3electionpb/v3election; do
|
||||
protobase="etcdserver/${pb}"
|
||||
protoc -I. \
|
||||
@ -93,8 +95,9 @@ for pb in etcdserverpb/rpc api/v3lock/v3lockpb/v3lock api/v3election/v3electionp
|
||||
go fmt ${gwfile}
|
||||
mv ${gwfile} ${pkgpath}/gw/
|
||||
rm -f ./etcdserver/${pb}*.bak
|
||||
swaggerName=`basename ${pb}`
|
||||
mv Documentation/dev-guide/apispec/swagger/etcdserver/${pb}.swagger.json \
|
||||
Documentation/dev-guide/apispec/swagger/${name}.swagger.json
|
||||
Documentation/dev-guide/apispec/swagger/${swaggerName}.swagger.json
|
||||
done
|
||||
rm -rf Documentation/dev-guide/apispec/swagger/etcdserver/
|
||||
|
||||
|
Reference in New Issue
Block a user