From 0141817fcab6cd15e6762b12bed6327b7b86795d Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 2 Mar 2023 13:40:26 +0100 Subject: [PATCH] docs: add swagger ui in docs (#15241) --- client/docs/config.json | 2 +- client/docs/swagger-ui/swagger.yaml | 2 +- docs/build-all.sh | 2 ++ docs/post.sh | 2 +- docs/pre.sh | 2 +- docs/sidebars.js | 2 +- x/README.md | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/client/docs/config.json b/client/docs/config.json index e5c02aa53a..8c79b4ecd8 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "Cosmos SDK - gRPC Gateway docs", - "description": "A REST interface for state queries", + "description": "A REST interface for state queries.", "version": "1.0.0" }, "apis": [ diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index c1dc66b17e..b14f03efbb 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -1,7 +1,7 @@ swagger: '2.0' info: title: Cosmos SDK - gRPC Gateway docs - description: A REST interface for state queries + description: A REST interface for state queries. version: 1.0.0 paths: /cosmos/auth/v1beta1/account_info/{address}: diff --git a/docs/build-all.sh b/docs/build-all.sh index 4caa88ed0c..d667a081f2 100755 --- a/docs/build-all.sh +++ b/docs/build-all.sh @@ -17,6 +17,8 @@ echo "building docusaurus main docs" mv ~/versioned_docs ~/versioned_sidebars . npm ci && npm run build mv build ~/output +echo "adding swagger docs" +cp -r ../client/docs/swagger-ui ~/output/swagger while read -r branch path_prefix; do echo "building vuepress $branch docs" (git clean -fdx && git reset --hard && git checkout $branch && npm install && VUEPRESS_BASE="/$path_prefix/" npm run build) diff --git a/docs/post.sh b/docs/post.sh index 7efeb8f62a..7bc2c2b2d2 100755 --- a/docs/post.sh +++ b/docs/post.sh @@ -8,4 +8,4 @@ rm -rf docs/tooling/04-hubl.md rm -rf docs/run-node/04-rosetta.md rm -rf docs/architecture rm -rf docs/spec -rm -rf versioned_docs versioned_sidebars versions.json +rm -rf versioned_docs versioned_sidebars versions.json \ No newline at end of file diff --git a/docs/pre.sh b/docs/pre.sh index a5cd449e7c..8e841e575e 100755 --- a/docs/pre.sh +++ b/docs/pre.sh @@ -30,4 +30,4 @@ cp ../tools/rosetta/README.md ./docs/run-node/04-rosetta.md cp -r ./architecture ./docs ## Add spec documentation -cp -r ./spec ./docs +cp -r ./spec ./docs \ No newline at end of file diff --git a/docs/sidebars.js b/docs/sidebars.js index 24e1d66144..45531a226f 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -35,7 +35,7 @@ const sidebars = { { type: "link", label: "REST API Spec", - href: "https://v1.cosmos.network/rpc/v0.45.1", + href: "https://docs.cosmos.network/swagger/", }, { type: "link", diff --git a/x/README.md b/x/README.md index 184b2de9a6..7d930b1c36 100644 --- a/x/README.md +++ b/x/README.md @@ -24,7 +24,7 @@ Here are some production-grade modules that can be used in Cosmos SDK applicatio * [NFT](./nft/README.md) - NFT module implemented based on [ADR43](https://docs.cosmos.network/main/architecture/adr-043-nft-module.html). * [Consensus](./consensus/README.md) - Consensus module for modifying Tendermint's ABCI consensus params. * [Circuit](./circuit/README.md) - Circuit breaker module for pausing messages. - +* [Genutil](./genutil/README.md) - Genesis utilities for the Cosmos SDK. To learn more about the process of building modules, visit the [building modules reference documentation](https://docs.cosmos.network/main/building-modules/intro).