Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of /bank/balances does not match implementation #6656

Closed
4 tasks
webmaster128 opened this issue Jul 9, 2020 · 3 comments
Closed
4 tasks

Documentation of /bank/balances does not match implementation #6656

webmaster128 opened this issue Jul 9, 2020 · 3 comments

Comments

@webmaster128
Copy link
Member

webmaster128 commented Jul 9, 2020

Summary of Bug

The result of a call to the LCD endpoint /bank/balances looks like

$ curl -sS http://localhost:1317/bank/balances/cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u | jq
{
  "height": "255",
  "result": [
    {
      "denom": "ucosm",
      "amount": "1000000000"
    },
    {
      "denom": "ustake",
      "amount": "1000000000"
    }
  ]
}

However, the output is documented like this:

[
  {
    "denom": "stake",
    "amount": "50"
  }
]

The "ucosm" and "ustake" denoms are from wasmd. The problem is the structure, not the values.

Version

0.38

Steps to Reproduce


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 9, 2020

@webmaster128 we've longggg ago stopped supporting any manual updates or maintenance to the swagger doc file, which was a huge PIA. We've attempted a stab at an automated solution here but we came across many roadblocks.

This happened before we started the Protobuf migration. So when we started Protobuf migration, we decided to ditch those efforts and use the Swagger documentation capabilities that'll come with JSON HTTP gateway.

So by all means you can keep this issue open, but we're not going to manually update the swagger doc.

@webmaster128
Copy link
Member Author

I see. Yeah, today I already found more issues than I can document. In this case I think a big warning like

This document is outdated beyond all hope and only serves as a rough sketch of what to expect from the LCD API. With the Stargate upgrade, we'll utilize the automated Swagger documentation capabilities that come with grpc-gateway (a JSON over HTTP proxy around grpc).

on https://cosmos.network/rpc

@tac0turtle
Copy link
Member

swagger doc is now autogenerated and proto based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants