scripts, Documentation: fix swagger generation
Changes to the genproto to support splitting out the grpc-gateway broke swagger generation.
This commit is contained in:
parent
97519cf79f
commit
1be245269e
@ -2179,6 +2179,10 @@
|
|||||||
"format": "int64",
|
"format": "int64",
|
||||||
"description": "compact_revision is set to the minimum index if a watcher tries to watch\nat a compacted index.\n\nThis happens when creating a watcher at a compacted revision or the watcher cannot\ncatch up with the progress of the key-value store. \n\nThe client should treat the watcher as canceled and should not try to create any\nwatcher with the same start_revision again."
|
"description": "compact_revision is set to the minimum index if a watcher tries to watch\nat a compacted index.\n\nThis happens when creating a watcher at a compacted revision or the watcher cannot\ncatch up with the progress of the key-value store. \n\nThe client should treat the watcher as canceled and should not try to create any\nwatcher with the same start_revision again."
|
||||||
},
|
},
|
||||||
|
"cancel_reason": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "cancel_reason indicates the reason for canceling the watcher."
|
||||||
|
},
|
||||||
"events": {
|
"events": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
|
@ -68,6 +68,8 @@ for dir in ${DIRS}; do
|
|||||||
popd
|
popd
|
||||||
done
|
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
|
for pb in etcdserverpb/rpc api/v3lock/v3lockpb/v3lock api/v3election/v3electionpb/v3election; do
|
||||||
protobase="etcdserver/${pb}"
|
protobase="etcdserver/${pb}"
|
||||||
protoc -I. \
|
protoc -I. \
|
||||||
@ -93,8 +95,9 @@ for pb in etcdserverpb/rpc api/v3lock/v3lockpb/v3lock api/v3election/v3electionp
|
|||||||
go fmt ${gwfile}
|
go fmt ${gwfile}
|
||||||
mv ${gwfile} ${pkgpath}/gw/
|
mv ${gwfile} ${pkgpath}/gw/
|
||||||
rm -f ./etcdserver/${pb}*.bak
|
rm -f ./etcdserver/${pb}*.bak
|
||||||
|
swaggerName=`basename ${pb}`
|
||||||
mv Documentation/dev-guide/apispec/swagger/etcdserver/${pb}.swagger.json \
|
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
|
done
|
||||||
rm -rf Documentation/dev-guide/apispec/swagger/etcdserver/
|
rm -rf Documentation/dev-guide/apispec/swagger/etcdserver/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user