cosmos-sdk/client/lcd
2018-09-02 21:42:17 +08:00
..
statik Add swagger-ui to gaiacli rest-server 2018-09-02 20:09:43 +08:00
swaggerui Add swagger-ui to gaiacli rest-server 2018-09-02 20:09:43 +08:00
lcd_test.go Refactor code according to code review 2018-09-02 21:42:17 +08:00
README.md Refactor code according to code review 2018-09-02 21:42:17 +08:00
root.go Rename rest-server to lite-server and add README to clarify how to update API docs 2018-09-02 20:30:59 +08:00
test_helpers.go IRISHUB-238: change wait 3 second to wait tendermint new block. use MustUnmarshalBinary instead of UnmarshalBinary 2018-08-31 23:20:06 +08:00
version.go Simulate transactions before actual execution 2018-08-24 10:16:51 +01:00
wire.go fix tests 2018-04-07 20:56:49 +03:00

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

  1. Install the command line tool first.
    go get github.com/rakyll/statik
    
  2. Edit API docs
    1. Directly Edit API docs manually: client/lcd/swaggerui/swagger.jso
    2. Edit API docs within this SwaggerHub. Please refer to this link for how to use the about website to edit API docs.
  3. Download swagger.json and replace the old swagger.json under client/lcd/swaggerui folds
  4. Regenerate client/lcd/statik/statik.go file
    statik -src=client/lcd/swaggerui -dest=client/lcd
    
  5. Compile new gaiacli
    make install