Skip to content

Commit

Permalink
Merge pull request #112 from b-harvest/104-fix-proto-swagger-gen
Browse files Browse the repository at this point in the history
fix: update proto, swagger and fix script
  • Loading branch information
tkkwon1998 authored Aug 4, 2023
2 parents d780d52 + 5e5a329 commit 3ea39d9
Show file tree
Hide file tree
Showing 46 changed files with 3,596 additions and 3,308 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -484,25 +484,27 @@ containerProtoGen=cosmos-sdk-proto-gen-$(containerProtoVer)
containerProtoGenSwagger=cosmos-sdk-proto-gen-swagger-$(containerProtoVer)
containerProtoFmt=cosmos-sdk-proto-fmt-$(containerProtoVer)

proto-all: proto-format proto-lint proto-gen
proto-all: proto-format proto-gen proto-swagger-gen update-swagger-docs

proto-gen:
@echo "Generating Protobuf files"
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
sh ./scripts/protocgen.sh; fi

proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@./scripts/protoc-swagger-gen.sh
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
sh ./scripts/protoc-swagger-gen.sh; fi

proto-format:
@echo "Formatting Protobuf files"
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
find ./ -not -path "./third_party/*" -name "*.proto" -exec clang-format -i {} \; ; fi

proto-lint:
@$(DOCKER_BUF) lint --error-format=json

proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
.PHONY: proto-all proto-gen proto-swagger-gen proto-format


TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.15/proto/tendermint
Expand Down
27 changes: 0 additions & 27 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
"version": "1.0.0"
},
"apis": [
{
"url": "./tmp-swagger-gen/canto/claims/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "ClaimsParams"
}
}
},
{
"url": "./tmp-swagger-gen/canto/epochs/v1/query.swagger.json"
},
Expand All @@ -25,14 +17,6 @@
}
}
},
{
"url": "./tmp-swagger-gen/canto/incentives/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "IncentivesParams"
}
}
},
{
"url": "./tmp-swagger-gen/canto/inflation/v1/query.swagger.json",
"operationIds": {
Expand All @@ -42,17 +26,6 @@
}
}
},
{
"url": "./tmp-swagger-gen/canto/vesting/v1/query.swagger.json"
},
{
"url": "./tmp-swagger-gen/canto/recovery/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "RecoveryParams"
}
}
},
{
"url": "./tmp-swagger-gen/ethermint/evm/v1/query.swagger.json",
"operationIds": {
Expand Down
3 changes: 2 additions & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit 3ea39d9

Please sign in to comment.