Skip to content

Commit

Permalink
Register swagger API (cosmos#7246)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
anilcse authored Sep 19, 2020
1 parent d6357e7 commit ca7b31d
Show file tree
Hide file tree
Showing 14 changed files with 29,819 additions and 15,875 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ go.sum: go.mod
###############################################################################

update-swagger-docs: statik
$(BINDIR)/statik -src=client/grpc-gateway -dest=client/grpc-gateway -f -m
$(BINDIR)/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;\
Expand Down
9 changes: 8 additions & 1 deletion client/grpc-gateway/config.json → client/docs/config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"swagger": "2.0",
"info": {
"title": "Cosmos SDK - GRPC Gateway",
"title": "Cosmos SDK - Legacy REST and gRPC Gateway docs",
"description": "A REST interface for state queries, legacy transactions",
"version": "1.0.0"
},
"apis": [
{
"url": "./client/docs/swagger_legacy.yaml",
"dereference": {
"circular": "ignore"
}
},
{
"url": "./cosmos/auth/v1beta1/query.swagger.json",
"operationIds": {
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit ca7b31d

Please sign in to comment.