Skip to content

Commit

Permalink
docs: update swagger for wasm
Browse files Browse the repository at this point in the history
wasmd 0.17.0(Finschia#249) After merging, the legacy style wasm proto path was fixed.
  • Loading branch information
Jiyong Ha committed Jul 20, 2021
1 parent 53f2410 commit 92938b1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
29 changes: 28 additions & 1 deletion client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: '2.0'
info:
title: Cosmos SDK - Legacy REST and gRPC Gateway docs
title: LFB SDK - Legacy REST and gRPC Gateway docs
description: 'A REST interface for state queries, legacy transactions'
version: 1.0.0
paths:
Expand Down Expand Up @@ -4920,6 +4920,9 @@ paths:
sig_verify_cost_secp256k1:
type: string
format: uint64
valid_sig_block_period:
type: string
format: uint64
description: >-
QueryParamsResponse is the response type for the Query/Params RPC
method.
Expand Down Expand Up @@ -32334,6 +32337,9 @@ definitions:
sig_verify_cost_secp256k1:
type: string
format: uint64
valid_sig_block_period:
type: string
format: uint64
description: Params defines the parameters for the auth module.
lfb.auth.v1beta1.QueryAccountResponse:
type: object
Expand Down Expand Up @@ -32425,6 +32431,9 @@ definitions:
sig_verify_cost_secp256k1:
type: string
format: uint64
valid_sig_block_period:
type: string
format: uint64
description: QueryParamsResponse is the response type for the Query/Params RPC method.
lfb.bank.v1beta1.DenomUnit:
type: object
Expand Down Expand Up @@ -45702,6 +45711,15 @@ definitions:
whole

transaction.
sig_block_height:
type: string
format: uint64
description: >-
sig block height is available between current block height and
current block height - `VALID_SIG_BLOCK_PERIOD`

this is used for distinguish signatures instead of account number.
this is mandatory.
memo:
type: string
title: memo is any arbitrary memo to be added to the transaction
Expand Down Expand Up @@ -46272,6 +46290,15 @@ definitions:
is referred to as the primary signer and pays the fee for the whole

transaction.
sig_block_height:
type: string
format: uint64
description: >-
sig block height is available between current block height and current
block height - `VALID_SIG_BLOCK_PERIOD`

this is used for distinguish signatures instead of account number.
this is mandatory.
memo:
type: string
title: memo is any arbitrary memo to be added to the transaction
Expand Down
3 changes: 1 addition & 2 deletions scripts/protoc-swagger-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eo pipefail

mkdir -p ./tmp-swagger-gen
proto_dirs=$(find ./proto ./x/wasm/internal/types -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do

# generate swagger files (filter query files)
Expand All @@ -12,7 +12,6 @@ for dir in $proto_dirs; do
buf protoc \
-I "proto" \
-I "third_party/proto" \
-I "x/wasm/internal/types" \
"$query_file" \
--swagger_out=./tmp-swagger-gen \
--swagger_opt=logtostderr=true --swagger_opt=fqn_for_swagger_name=true --swagger_opt=simple_operation_ids=true
Expand Down

0 comments on commit 92938b1

Please sign in to comment.