From e1bb6fc0d264bd6ebea1912db22f6bc7b9bec7f1 Mon Sep 17 00:00:00 2001 From: HaoyangLiu Date: Tue, 2 Oct 2018 23:52:54 +0800 Subject: [PATCH] Move update_API_docs.md to docs/DOCS_README.md --- docs/DOCS_README.md | 20 ++++++++++++++++++++ docs/light/update_API_docs.md | 18 ------------------ 2 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 docs/light/update_API_docs.md diff --git a/docs/DOCS_README.md b/docs/DOCS_README.md index 38fa30c4f..59a1c9b6d 100644 --- a/docs/DOCS_README.md +++ b/docs/DOCS_README.md @@ -10,6 +10,11 @@ built from the files in this (`/docs`) directory for and [develop](https://github.com/cosmos/cosmos-sdk/tree/develop/docs), respectively. +Besides, gaia-lite API docs are also provided by gaia-lite. The default API docs page is: +``` +https://localhost:1317/swagger-ui/ +``` + ## How It Works There is a Jenkins job listening for changes in the `/docs` directory, on both @@ -93,3 +98,18 @@ then navigate to localhost:8080 in your browser. Because the build processes are identical (as is the information contained herein), this file should be kept in sync as much as possible with its [counterpart in the Tendermint Core repo](https://github.com/tendermint/tendermint/blob/develop/docs/DOCS_README.md). + +## Update and Build the RPC docs + +1. Execute the following command at the root directory to install the swagger-ui generate tool. + ``` + make get_tools + ``` +2. Edit API docs + 1. Directly Edit API docs manually: `client/lcd/swagger-ui/swagger.yaml`. + 2. Edit API docs within [SwaggerHub](https://app.swaggerhub.com). Please refer to this [document](https://app.swaggerhub.com/help/index) for how to use the about website to edit API docs. +3. Download `swagger.yaml` and replace the old `swagger.yaml` under fold `client/lcd/swagger-ui`. +4. Compile gaiacli + ``` + make install + ``` \ No newline at end of file diff --git a/docs/light/update_API_docs.md b/docs/light/update_API_docs.md deleted file mode 100644 index f2ebeb1ed..000000000 --- a/docs/light/update_API_docs.md +++ /dev/null @@ -1,18 +0,0 @@ -# How to update API docs - -Due to the rest handlers and related data structures are complicated and distributed in many sub-folds, currently there is no tool which can automatically extract all APIs information and generate API docs. So here we have to write APIs' docs manually. - -## Steps - -1. Install the swagger-ui generate tool first. - ``` - make get_tools - ``` -2. Edit API docs - 1. Directly Edit API docs manually: `client/lcd/swagger-ui/swagger.yaml`. - 2. Edit API docs within [SwaggerHub](https://app.swaggerhub.com). Please refer to this [document](https://app.swaggerhub.com/help/index) for how to use the about website to edit API docs. -3. Download `swagger.yaml` and replace the old `swagger.yaml` under fold `client/lcd/swagger-ui`. -4. Compile gaiacli - ``` - make install - ``` \ No newline at end of file