docs: Rosetta openapi specification (#14061)
* add: openapi documentation * fix * CHANGELOG
This commit is contained in:
parent
b25908b964
commit
8bb4521ff7
@ -37,8 +37,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
## [Unreleased]
|
||||
|
||||
### Improvements
|
||||
|
||||
* [#13832](https://github.com/cosmos/cosmos-sdk/pull/13832) Correctly populates rosetta's `/network/status` endpoint response. Roseta data api is divided into its own go files (account, block, mempool, network).
|
||||
* [#14061](https://github.com/cosmos/cosmos-sdk/pull/14061) Adds openapi specification.
|
||||
* [#13832](https://github.com/cosmos/cosmos-sdk/pull/13832) Correctly populates rosetta's `/network/status` endpoint response. Rosetta's data api is divided into its own go files (account, block, mempool, network).
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
@ -55,6 +55,6 @@ func (on OnlineNetwork) AccountBalance(ctx context.Context, request *types.Accou
|
||||
|
||||
// AccountsCoins - relevant only for UTXO based chain
|
||||
// see https://www.rosetta-api.org/docs/AccountApi.html#accountcoins
|
||||
func (o OnlineNetwork) AccountCoins(_ context.Context, _ *types.AccountCoinsRequest) (*types.AccountCoinsResponse, *types.Error) {
|
||||
func (on OnlineNetwork) AccountCoins(_ context.Context, _ *types.AccountCoinsRequest) (*types.AccountCoinsResponse, *types.Error) {
|
||||
return nil, errors.ToRosetta(errors.ErrOffline)
|
||||
}
|
||||
|
||||
27
tools/rosetta/openapi/index.html
Normal file
27
tools/rosetta/openapi/index.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!-- HTML for static distribution bundle build -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Rosetta API</title>
|
||||
<link rel="stylesheet" type="text/css" href="//unpkg.com/swagger-ui-dist@3.25.0/swagger-ui.css">
|
||||
<link rel="icon" type="image/png" href="//unpkg.com/swagger-ui-dist@3.25.0/favicon-16x16.png" />
|
||||
<script src="//unpkg.com/swagger-ui-dist@3.25.0/swagger-ui-bundle.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
window.ui = SwaggerUIBundle({
|
||||
url: "./openapi.yaml",
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
layout: "BaseLayout"
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
1227
tools/rosetta/openapi/openapi.yaml
Normal file
1227
tools/rosetta/openapi/openapi.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user