-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add default endpoint for REST server #5607
Comments
ACK -- I would personally love to lay out all the endpoints like Tendermint does. Would this be something you'd be willing to look into and implement @okwme? |
ja would be happy to look into it! |
on the Tendermint side, we want to move away from what we have now and if possible go to using the generated swagger. Here it may make sense to use the swagger for now, and then once we have auto-generate swagger files it would show only that |
ooooo i love this idea!
…On Tue, Feb 4, 2020 at 10:04 AM Marko ***@***.***> wrote:
on the Tendermint side, we want to move away from what we have now and if
possible go to using the generated swagger. Here it may make sense to use
the swagger for now, and then once we have auto-generate swagger files it
would show only that
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#5607?email_source=notifications&email_token=AAHLLVFKN3ZVKS5YOI3WFI3RBEVSLA5CNFSM4KPIMAYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKW3FAQ#issuecomment-581808770>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHLLVEPEBAASZPF2D4E7QLRBEVSLANCNFSM4KPIMAYA>
.
--
billyrennekamp.com
|
Sure, that also works. In that case, just simply update this method: func (rs *RestServer) registerSwaggerUI() {
statikFS, err := fs.New()
if err != nil {
panic(err)
}
staticServer := http.FileServer(statikFS)
rs.Mux.PathPrefix("/swagger-ui/").Handler(http.StripPrefix("/swagger-ui/", staticServer))
} I suppose we should use |
Summary
The default endpoint for the Tendermint RPC shows all the available queries. This is also useful just to make sure the node is running (https://rpc.cosmos.network).
However, the default REST client shows a 404 (http://api.cosmos.network) and you need to go to
/node_info
or another GET request without parameters to check if it's online. It would be nice if we could offer a default endpoint that was more reassuring than a 404. Either some sort of "Hello World!" message or set the default route to be the same as/node_info
?Problem Definition
Proposal
For Admin Use
The text was updated successfully, but these errors were encountered: