github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/order/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/order/keeper"
    31  	"github.com/fibonacci-chain/fbc/x/order/types"
    32  )
    33  
    34  // OrderDetailParam : order detail param
    35  // swagger:parameters getOrderDetail
    36  type OrderDetailParam struct {
    37  	// an id of order
    38  	// Required: true
    39  	// in: path
    40  	OrderID string `json:"order_id"`
    41  }
    42  
    43  // OrderResponse : Order Info
    44  // swagger:response OrderResponse
    45  type OrderResponse struct {
    46  	// in: body
    47  	Body types.Order
    48  }
    49  
    50  // swagger:route GET /order/{orderID} order getOrderDetail
    51  //
    52  // Get order detail by orderID
    53  //
    54  //     Schemes: http, https
    55  //     Responses:
    56  //       200: OrderResponse
    57  
    58  // BookParam : order depth book param
    59  // swagger:parameters getDepthBook
    60  type BookParam struct {
    61  	// token pair string
    62  	// Required: true
    63  	// in: query
    64  	Product string `json:"product"`
    65  }
    66  
    67  // BookResponse : Order depth book
    68  // swagger:response BookResponse
    69  type BookResponse struct {
    70  	// in: body
    71  	Body keeper.BookRes
    72  }
    73  
    74  // swagger:route GET /order/depthbook order getDepthBook
    75  //
    76  // Get order depthbook
    77  //
    78  //     Schemes: http, https
    79  //     Responses:
    80  //       200: BookResponse