Fix sawgger gen output dir (#7374)

* Fix sawgger gen output dir

* Fix lint

* Update make clean

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
Anil Kumar Kammari
2020-09-23 14:16:47 +00:00
committed by GitHub
co-authored by Alessio Treglia
parent 59c43cd047
commit a722933ade
3 changed files with 20 additions and 18 deletions
+2 -1
View File
@@ -147,7 +147,8 @@ distclean: clean
clean:
rm -rf \
$(BUILDDIR)/ \
artifacts/
artifacts/ \
tmp-swagger-gen/
.PHONY: distclean clean
+14 -14
View File
@@ -13,7 +13,7 @@
}
},
{
"url": "./cosmos/auth/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/auth/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "AuthParams"
@@ -21,7 +21,7 @@
}
},
{
"url": "./cosmos/bank/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/bank/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "BankParams"
@@ -29,7 +29,7 @@
}
},
{
"url": "./cosmos/distribution/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/distribution/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "DistributionParams"
@@ -37,7 +37,7 @@
}
},
{
"url": "./cosmos/evidence/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/evidence/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "EvidenceParams"
@@ -45,7 +45,7 @@
}
},
{
"url": "./cosmos/gov/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/gov/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "GovParams"
@@ -53,7 +53,7 @@
}
},
{
"url": "./cosmos/mint/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/mint/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "MintParams"
@@ -61,7 +61,7 @@
}
},
{
"url": "./cosmos/params/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/params/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "Params"
@@ -69,7 +69,7 @@
}
},
{
"url": "./cosmos/slashing/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/slashing/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "SlashingParams"
@@ -77,7 +77,7 @@
}
},
{
"url": "./cosmos/staking/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/staking/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "StakingParams",
@@ -86,7 +86,7 @@
}
},
{
"url": "./cosmos/upgrade/v1beta1/query.swagger.json",
"url": "./tmp-swagger-gen/cosmos/upgrade/v1beta1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "UpgradeParams"
@@ -94,7 +94,7 @@
}
},
{
"url": "./ibc/channel/query.swagger.json",
"url": "./tmp-swagger-gen/ibc/channel/query.swagger.json",
"operationIds": {
"rename": {
"Params": "IBCChannelParams"
@@ -102,7 +102,7 @@
}
},
{
"url": "./ibc/client/query.swagger.json",
"url": "./tmp-swagger-gen/ibc/client/query.swagger.json",
"operationIds": {
"rename": {
"Params": "IBCClientParams"
@@ -110,7 +110,7 @@
}
},
{
"url": "./ibc/connection/query.swagger.json",
"url": "./tmp-swagger-gen/ibc/connection/query.swagger.json",
"operationIds": {
"rename": {
"Params": "IBCConnectionParams"
@@ -118,7 +118,7 @@
}
},
{
"url": "./ibc/transfer/query.swagger.json",
"url": "./tmp-swagger-gen/ibc/transfer/query.swagger.json",
"operationIds": {
"rename": {
"Params": "IBCTransferParams"
+4 -3
View File
@@ -2,6 +2,7 @@
set -eo pipefail
mkdir -p ./tmp-swagger-gen
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
@@ -12,7 +13,8 @@ for dir in $proto_dirs; do
-I "proto" \
-I "third_party/proto" \
"$query_file" \
--swagger_out=logtostderr=true,stderrthreshold=1000,fqn_for_swagger_name=true,simple_operation_ids=true:.
--swagger_out ./tmp-swagger-gen \
--swagger_opt logtostderr=true --swagger_opt fqn_for_swagger_name=true --swagger_opt simple_operation_ids=true
fi
done
@@ -22,5 +24,4 @@ done
swagger-combine ./client/docs/config.json -o ./client/docs/swagger-ui/swagger.yaml -f yaml --continueOnConflictingPaths true --includeDefinitions true
# clean swagger files
rm -rf cosmos
rm -rf ibc
rm -rf ./tmp-swagger-gen