sunriselayer / sunrise

Other
7 stars 1 forks source link

Problems with Query taking nested arg #69

Closed Senna46 closed 2 weeks ago

Senna46 commented 1 month ago

Related to #66

The OpenAPI cannot interpret the nested structure of Route https://github.com/sunriselayer/sunrise/blob/query-calc-swap/docs/static/openapi.yml#L4911-L4934 (GET requests in Axios not verified now)

Also, query parameters have a limit of 2048 including paths

If problems arise, please address them by changing to POST requests, etc.

e.g.

.proto
  rpc CalculationSwapExactAmountIn(QueryCalculationSwapExactAmountInRequest) returns (QueryCalculationSwapExactAmountInResponse) {
    option (google.api.http) = {
      post: "/sunrise/swap/calculate/swap_exact_amount_in" // change to POST
      body: "*" // unmarshal all body
    };
  };
Senna46 commented 2 weeks ago

83 solved this issue.