Skip to content

Commit

Permalink
update swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa committed Jan 9, 2023
1 parent ff2d93e commit 1a23289
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 36 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ e2e/.*/config/addrbook.json
upgrade-tests/data*
upgrade-tests/exported-genesis-new.json

tmp
tmp

.DS_Store
12 changes: 11 additions & 1 deletion module/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Building

On first run:

```
sudo dnf install make automake gcc gcc-c++ kernel-devel
Expand All @@ -14,12 +15,14 @@ sudo make proto-tools
```

Following builds and test:

```
make
make test
```

To update protos after editing .proto files

```
make proto-gen
```
Expand All @@ -30,4 +33,11 @@ go test ./x/gravity/migrations/v2/... -v --count=1

go test ./x/gravity/migrations/v3/... -v --count=1

go test ./x/gravity/keeper/... -v --count=1
go test ./x/gravity/keeper/... -v --count=1

## Update swagger

```bash
go install github.com/rakyll/statik
statik -src doc/swagger-ui/ -dest doc -f
```
2 changes: 1 addition & 1 deletion module/doc/statik/statik.go

Large diffs are not rendered by default.

Binary file removed module/doc/swagger-ui/favicon-16x16.png
Binary file not shown.
Binary file added module/doc/swagger-ui/favicon-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed module/doc/swagger-ui/favicon-32x32.png
Binary file not shown.
56 changes: 23 additions & 33 deletions module/doc/swagger-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="swagger-ui.css" >
<link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
<meta charset="UTF-8" />
<title>OraiBridge Swagger UI</title>
<link rel="stylesheet" type="text/css" href="swagger-ui.css" />
<link rel="shortcut icon" type="image/png" href="favicon-32x32.png" />
<style>
html
{
html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}

*,
*:before,
*:after
{
*:after {
box-sizing: inherit;
}

body
{
margin:0;
body {
margin: 0;
background: #fafafa;
}
</style>
Expand All @@ -33,28 +29,22 @@
<body>
<div id="swagger-ui"></div>

<script src="swagger-ui-bundle.js"> </script>
<script src="swagger-ui-standalone-preset.js"> </script>
<script src="swagger-ui-bundle.js"></script>
<script src="swagger-ui-standalone-preset.js"></script>
<script>
window.onload = function() {
window.onload = function () {
// Build a system
const ui = SwaggerUIBundle({
url: "./swagger.yaml",
dom_id: "#swagger-ui",
deepLinking: true,
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
plugins: [SwaggerUIBundle.plugins.DownloadUrl],
layout: "StandaloneLayout",
});

// Build a system
const ui = SwaggerUIBundle({
url: "./swagger.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})

window.ui = ui
}
</script>
window.ui = ui;
};
</script>
</body>
</html>

0 comments on commit 1a23289

Please sign in to comment.