Skip to content

Commit ca7b31d

Browse files
authored
Register swagger API (#7246)
* init * Fix statik gen * Fix swagger * Change swagger url * Fix swagger serve * remove ibc swagger from legacy docs * Add old routes config * Move swagger api to app.go * add godoc * Fix inputs * Fix swagger dir * Fix statik * refactor * fmt * fix doc * Fix swagger config check
1 parent d6357e7 commit ca7b31d

File tree

14 files changed

+29819
-15875
lines changed

14 files changed

+29819
-15875
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ go.sum: go.mod
170170
###############################################################################
171171

172172
update-swagger-docs: statik
173-
$(BINDIR)/statik -src=client/grpc-gateway -dest=client/grpc-gateway -f -m
173+
$(BINDIR)/statik -src=client/docs/swagger-ui -dest=client/docs -f -m
174174
@if [ -n "$(git status --porcelain)" ]; then \
175175
echo "\033[91mSwagger docs are out of sync!!!\033[0m";\
176176
exit 1;\

client/grpc-gateway/config.json client/docs/config.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "Cosmos SDK - GRPC Gateway",
4+
"title": "Cosmos SDK - Legacy REST and gRPC Gateway docs",
5+
"description": "A REST interface for state queries, legacy transactions",
56
"version": "1.0.0"
67
},
78
"apis": [
9+
{
10+
"url": "./client/docs/swagger_legacy.yaml",
11+
"dereference": {
12+
"circular": "ignore"
13+
}
14+
},
815
{
916
"url": "./cosmos/auth/v1beta1/query.swagger.json",
1017
"operationIds": {

client/docs/statik/statik.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)