Skip to content

Commit

Permalink
Fix client docs (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuyenthevinh2000 authored Jun 8, 2023
1 parent a2b36bf commit e504e2b
Show file tree
Hide file tree
Showing 6 changed files with 15,154 additions and 17,549 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,19 @@ build-release-arm64: go.sum
install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/terrad

update-swagger-docs: statik
$(BINDIR)/statik -src=client/docs/swagger-ui -dest=client/docs -f -m
docs:
@./scripts/protoc-swagger-gen.sh

@rm -f client/docs/statik/statik.go
@statik -src=client/docs/swagger-ui -dest=client/docs -f -m
@if [ -n "$(git status --porcelain)" ]; then \
echo "\033[91mSwagger docs are out of sync!!!\033[0m";\
exit 1;\
else \
echo "\033[92mSwagger docs are in sync\033[0m";\
fi

.PHONY: build build-linux install update-swagger-docs
.PHONY: build build-linux install docs

########################################
### Tools & dependencies
Expand Down Expand Up @@ -282,17 +285,14 @@ proto-format:
@echo "Formatting Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${CONTAINER_PROTO_FMT}$$"; then docker start -a $(CONTAINER_PROTO_FMT); else docker run --name $(CONTAINER_PROTO_FMT) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
find ./proto -name "*.proto" -exec clang-format -i {} \; ; fi

proto-swagger-gen:
@./scripts/protoc-swagger-gen.sh


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 proto-lint proto-check-breaking
.PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking

###############################################################################
### Localnet ###
Expand Down
11 changes: 8 additions & 3 deletions client/docs/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"swagger": "2.0",
"info": {
"title": "Cosmos SDK - Legacy REST and gRPC Gateway docs",
"title": "Terra-Lite for Terra",
"description": "A REST interface for state queries, legacy transactions",
"version": "1.0.0"
"version": "2.1.0"
},
"apis": [
{
Expand Down Expand Up @@ -144,11 +144,16 @@
}
},
{
"url": "../../tmp-swagger-gen/terra/wasm/v1beta1/query.swagger.json",
"url": "../../tmp-swagger-gen/cosmwasm/wasm/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "WasmParams"
}
},
"tags": {
"rename": {
"Query": "Wasm"
}
}
},
{
Expand Down
9 changes: 5 additions & 4 deletions client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit e504e2b

Please sign in to comment.