github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/token/client/rest/rest_doc.go (about)

     1  // Package rest API.
     2  //
     3  // the purpose of this application is to provide an application
     4  // that is using plain go code to define an API
     5  //
     6  // This should demonstrate all the possible comment annotations
     7  // that are available to turn go code into a fully compliant swagger 2.0 spec
     8  //
     9  // Terms Of Service:
    10  //
    11  // there are no TOS at this moment, use at your own risk we take no responsibility
    12  //
    13  //	Schemes: http, https
    14  //	Version: 0.0.1
    15  //	License: MIT http://opensource.org/licenses/MIT
    16  //
    17  //	Security:
    18  //	- api_key:
    19  //
    20  //	SecurityDefinitions:
    21  //	api_key:
    22  //	     type: apiKey
    23  //	     name: KEY
    24  //	     in: header
    25  //
    26  // swagger:meta
    27  package rest
    28  
    29  import (
    30  	"github.com/fibonacci-chain/fbc/x/token/types"
    31  )
    32  
    33  // A Products is the info of the market.
    34  // swagger:response TokenPairs
    35  //type TokenPairs struct {
    36  //	// The market message
    37  //	// in: body
    38  //	Body []types.TokenPair
    39  //}
    40  
    41  // A TokenInfos is the info of the market.
    42  // swagger:response TokenInfos
    43  type TokenInfos struct {
    44  	// The market message
    45  	// in: body
    46  	Body []types.Token
    47  }
    48  
    49  // A TokenInfo is the info of the market.
    50  // swagger:response TokenInfo
    51  type TokenInfo struct {
    52  	// The market message
    53  	// in: body
    54  	Body types.Token
    55  }
    56  
    57  // A CoinInfos is the info of the coins.
    58  // swagger:response CoinInfos
    59  type CoinInfos struct {
    60  	// The coin infos
    61  	// in: body
    62  	Body []types.CoinInfo
    63  }
    64  
    65  // A ResponseError is an error that is used when the required input fails validation.
    66  // swagger:response ResponseError
    67  type ResponseError struct {
    68  	// The error message
    69  	// in: body
    70  	Body struct {
    71  		// The validation message
    72  		//
    73  		// Example: Expected type int
    74  		Code string
    75  		// An optional field name to which this validation applies
    76  		Message string
    77  		// An optional field name to which this validation applies
    78  		Data string
    79  	}
    80  }
    81  
    82  // swagger:route GET /products token listProducts
    83  //
    84  // List all products.
    85  //
    86  // This will show all products.
    87  //
    88  //     Schemes: http, https
    89  //
    90  //     Security:
    91  //       api_key:
    92  //
    93  //     Responses:
    94  //       200: TokenPairs
    95  //       422: ResponseError
    96  
    97  // swagger:route GET /tokens token tokensInfo
    98  //
    99  // List all tokens info.
   100  //
   101  // This will show all tokens info.
   102  //
   103  //     Schemes: http, https
   104  //
   105  //     Security:
   106  //       api_key:
   107  //
   108  //     Responses:
   109  //       200: TokenInfos
   110  //       422: ResponseError
   111  
   112  // swagger:operation GET /token/{symbol} token tokenInfo
   113  // ---
   114  // summary: List specified token info.
   115  // description: This will show the specified token info.
   116  // parameters:
   117  //   - name: symbol
   118  //     in: path
   119  //     description: the symbol of token
   120  //     type: string
   121  //     required: true
   122  // responses:
   123  //   "200":
   124  //     "$ref": "#/responses/TokenInfo"
   125  
   126  // swagger:operation GET /accounts/{address} token getCoinInfos
   127  // ---
   128  // summary: show specified coins info of address.
   129  // description: This will show the coins info.
   130  // parameters:
   131  //   - name: address
   132  //     in: path
   133  //     description: the address of accounts
   134  //     type: string
   135  //     required: true
   136  // responses:
   137  //   "200":
   138  //     "$ref": "#/responses/CoinInfos"