Rename rest-server to lite-server and add README to clarify how to update API docs
This commit is contained in:
parent
79c0bc40c8
commit
8e032f850a
|
@ -0,0 +1,20 @@
|
|||
# How to update API docs
|
||||
|
||||
Due to the rest handlers and related data structures are 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
|
||||
|
||||
* Install the command line tool first.
|
||||
```
|
||||
go get github.com/rakyll/statik
|
||||
```
|
||||
* Directly Edit API docs: client/lcd/swaggerui/swagger.json
|
||||
|
||||
* Edit API docs within this [website](https://app.swaggerhub.com). Please refer to this [link](https://app.swaggerhub.com/help/index) for how to use the about website to edit API docs.
|
||||
|
||||
* Download swagger.json and replace the old swagger.json under client/lcd/swaggerui folds
|
||||
|
||||
* Regenerate statik.go file
|
||||
```
|
||||
statik -src=client/lcd/swaggerui -dest=client/lcd
|
||||
```
|
|
@ -34,8 +34,8 @@ func ServeCommand(cdc *wire.Codec) *cobra.Command {
|
|||
flagMaxOpenConnections := "max-open"
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "rest-server",
|
||||
Short: "Start LCD (light-client daemon), a local REST server",
|
||||
Use: "lite-server",
|
||||
Short: "Start Gaia-lite server daemon, a local REST server",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
listenAddr := viper.GetString(flagListenAddr)
|
||||
router := createHandler(cdc)
|
||||
|
@ -58,7 +58,7 @@ func ServeCommand(cdc *wire.Codec) *cobra.Command {
|
|||
return err
|
||||
}
|
||||
|
||||
logger.Info("REST server started")
|
||||
logger.Info("Gaia-lite server started")
|
||||
|
||||
// wait forever and cleanup
|
||||
cmn.TrapSignal(func() {
|
||||
|
|
Loading…
Reference in New Issue