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

refactor: helper method for register swagger api #12352

Prev Previous commit
Next Next commit
moved RegisterSwaggerAPI from baseapp to server, added changelog
  • Loading branch information
deepto98 committed Jul 3, 2022
commit d03703698050d2185fdb4439701ac7e7ca65b800
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
# Changelog

## [Unreleased]

* (server) [\#12352](https://github.com/cosmos/cosmos-sdk/pull/12352) Move the `RegisterSwaggerAPI` logic into a separate helper function in the server package
amaury1093 marked this conversation as resolved.
Show resolved Hide resolved
### Features

* (cli) [#12028](https://github.com/cosmos/cosmos-sdk/pull/12028) Add the `tendermint key-migrate` to perform Tendermint v0.35 DB key migration.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package baseapp
package server

import (
"net/http"
Expand Down
3 changes: 2 additions & 1 deletion simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"cosmossdk.io/core/appconfig"

"github.com/cosmos/cosmos-sdk/depinject"
deepto98 marked this conversation as resolved.
Show resolved Hide resolved
"github.com/cosmos/cosmos-sdk/server"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you group the imports :)


"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -408,7 +409,7 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon
app.App.RegisterAPIRoutes(apiSvr, apiConfig)

// register swagger API (using common function from baseapp package) from root so that other applications can override easily
baseapp.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger)
server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger)
}

// GetMaccPerms returns a copy of the module account permissions
Expand Down