Skip to content

Commit

Permalink
change endpoint of pool query by pool_coin_denom
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsam committed Jun 7, 2021
1 parent 7e2dca9 commit 767164a
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 120 deletions.
2 changes: 1 addition & 1 deletion client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Cosmos SDK Liquidity Module - REST and gRPC Gateway docs",
"description": "A REST interface for state queries, transactions",
"version": "2.2.1"
"version": "2.2.2"
},
"apis": [
{
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

100 changes: 99 additions & 1 deletion client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ swagger: '2.0'
info:
title: Cosmos SDK Liquidity Module - REST and gRPC Gateway docs
description: 'A REST interface for state queries, transactions'
version: 2.2.1
version: 2.2.2
paths:
/tendermint/liquidity/v1beta1/params:
get:
Expand Down Expand Up @@ -318,6 +318,104 @@ paths:
externalDocs:
description: Find out more about the query and error codes
url: 'https://github.com/tendermint/liquidity/blob/develop/doc/client.md'
'/tendermint/liquidity/v1beta1/pools/denom/{pool_coin_denom}':
get:
summary: Get specific liquidity pool corresponding to the pool_coin_denom.
description: It returns the liquidity pool corresponding to the pool_coin_denom.
operationId: LiquidityPoolByPoolCoinDenom
responses:
'200':
description: A successful response.
schema:
type: object
properties:
pool:
type: object
properties:
id:
type: string
format: uint64
example: '1'
title: id of the pool
type_id:
type: integer
format: uint32
example: '1'
title: id of the pool_type
reserve_coin_denoms:
type: array
example:
- denomX
- denomY
items:
type: string
title: denoms of reserve coin pair of the pool
reserve_account_address:
type: string
format: sdk.AccAddress
example: cosmos16ddqestwukv0jzcyfn3fdfq9h2wrs83cr4rfm3
title: reserve account address of the pool
pool_coin_denom:
type: string
example: >-
poolD35A0CC16EE598F90B044CE296A405BA9C381E38837599D96F2F70C2F02A23A4
title: denom of pool coin of the pool
title: The liquidity pool information
description: >-
the response type for the QueryLiquidityPoolResponse RPC method.
It returns the liquidity pool corresponding to the requested
pool_id.
'400':
description: Bad Request
schema: {}
examples:
application/json:
code: 3
message: TBD
details: []
'500':
description: Internal Server Error
schema: {}
examples:
application/json:
code: 2
message: >-
rpc error: code = NotFound desc = the liquidity pool
corresponding to the pool_coin_denom doesn't exist: key not
found
details: []
default:
description: An unexpected error response.
schema:
type: object
properties:
error:
type: string
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
type_url:
type: string
value:
type: string
format: byte
parameters:
- name: pool_coin_denom
in: path
required: true
type: string
tags:
- Query
externalDocs:
description: Find out more about the query and error codes
url: 'https://github.com/tendermint/liquidity/blob/develop/doc/client.md'
'/tendermint/liquidity/v1beta1/pools/{pool_id}':
get:
summary: Get specific liquidity pool.
Expand Down
2 changes: 1 addition & 1 deletion proto/tendermint/liquidity/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ service Query {

// Get specific liquidity pool corresponding to the pool_coin_denom.
rpc LiquidityPoolByPoolCoinDenom (QueryLiquidityPoolByPoolCoinDenomRequest) returns (QueryLiquidityPoolResponse) {
option (google.api.http).get = "/tendermint/liquidity/v1beta1/pools/{pool_coin_denom}";
option (google.api.http).get = "/tendermint/liquidity/v1beta1/pools/denom/{pool_coin_denom}";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
description: "It returns the liquidity pool corresponding to the pool_coin_denom.";
external_docs: {
Expand Down
Loading

0 comments on commit 767164a

Please sign in to comment.