docs: Rosetta openapi specification (#14061)

* add: openapi documentation

* fix

* CHANGELOG
This commit is contained in:
Julián Toledano 2022-11-29 14:10:01 +01:00 committed by GitHub
parent b25908b964
commit 8bb4521ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1257 additions and 3 deletions

View File

@ -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

View File

@ -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)
}

View 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>

File diff suppressed because it is too large Load Diff