zeta-chain / node

ZetaChain’s blockchain node and an observer validator client
https://zetachain.com
MIT License
161 stars 104 forks source link

Mismatch between actual API endpoints and the ones in OpenAPI (Swagger) #1449

Closed fadeev closed 8 months ago

fadeev commented 8 months ago

For example, OpenAPI says there should be an endpoint /zeta-chain/emissions/params:

https://github.com/zeta-chain/node/blob/26a4abe19ea4d70534fb5113d00c77b901a6b682/docs/openapi/openapi.swagger.yaml#L27234

In reality, this endpoint doesn't exist and we have /zeta-chain/zetacore/emissions/params, instead:

https://zetachain-athens.blockpi.network/lcd/v1/public/zeta-chain/zetacore/emissions/params

This is because we still have zetacore in proto and there is a mismatch between directories and proto package names:

https://github.com/zeta-chain/node/blob/26a4abe19ea4d70534fb5113d00c77b901a6b682/proto/emissions/params.proto#L2

Right now all ZetaChain's custom endpoints are not accessible from the OpenAPI browser.

fadeev commented 8 months ago

I propose we refactor this to:

package zetachain.emissions; 

To keep things simple.

fadeev commented 8 months ago

Ideally, instead of /zeta-chain/zetacore/emissions/... we have /zeta-chain/emissions/....

fadeev commented 8 months ago

No longer relevant: https://github.com/zeta-chain/node/pull/1282