-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use Buf for proto generation (#359)
Co-authored-by: Alex Johnson <[email protected]>
- Loading branch information
1 parent
01554e7
commit e0165c2
Showing
128 changed files
with
5,280 additions
and
8,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: v1 | ||
directories: | ||
- proto | ||
- third_party/proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Quicksilver Chain - REST API", | ||
"description": "REST interface for query and transaction services", | ||
"version": "1.0.0" | ||
}, | ||
"apis": [ | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/airdrop/v1/messages.swagger.json" | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/airdrop/v1/query.swagger.json", | ||
"operationIds": { | ||
"rename": { | ||
"Params": "AirdropParams" | ||
} | ||
}, | ||
"tags": { | ||
"rename": { | ||
"Query": "QueryAirdrop" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/claimsmanager/v1/messages.swagger.json" | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/claimsmanager/v1/query.swagger.json", | ||
"operationIds": { | ||
"rename": { | ||
"Params": "ClaimsManagerParams" | ||
} | ||
}, | ||
"tags": { | ||
"rename": { | ||
"Query": "QueryClaimsManager" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/epochs/v1/query.swagger.json", | ||
"tags": { | ||
"rename": { | ||
"Query": "QueryEpochs" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/interchainquery/v1/messages.swagger.json", | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/interchainquery/v1/query.swagger.json", | ||
"tags": { | ||
"rename": { | ||
"QuerySrvr": "QueryInterchainQuery" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/interchainstaking/v1/messages.swagger.json" | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/interchainstaking/v1/query.swagger.json", | ||
"operationIds": { | ||
"rename": { | ||
"Params": "InterchainStakingParams" | ||
} | ||
}, | ||
"tags": { | ||
"rename": { | ||
"Query": "QueryInterchainStaking" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/mint/v1beta1/query.swagger.json", | ||
"operationIds": { | ||
"rename": { | ||
"Params": "MintParams" | ||
} | ||
}, | ||
"tags": { | ||
"rename": { | ||
"Query": "QueryMint" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/participationrewards/v1/messages.swagger.json" | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/participationrewards/v1/query.swagger.json", | ||
"operationIds": { | ||
"rename": { | ||
"Params": "ParticipationRewardsParams" | ||
} | ||
}, | ||
"tags": { | ||
"rename": { | ||
"Query": "QueryParticipationRewards" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/tokenfactory/v1beta1/tx.swagger.json" | ||
}, | ||
{ | ||
"url": "./tmp-swagger-gen/quicksilver/tokenfactory/v1beta1/query.swagger.json", | ||
"operationIds": { | ||
"rename": { | ||
"Params": "TokenFactoryParams" | ||
} | ||
}, | ||
"tags": { | ||
"rename": { | ||
"Query": "QueryTokenFactory" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package docs | ||
|
||
import "embed" | ||
|
||
// Swagger is the data of the swagger page generated by protobuf | ||
// | ||
//go:embed swagger.yml | ||
var Swagger embed.FS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// https://github.com/ignite/cli/blob/main/ignite/pkg/openapiconsole/console.go | ||
|
||
package docs | ||
|
||
import ( | ||
"embed" | ||
"html/template" | ||
"net/http" | ||
) | ||
|
||
//go:embed index.tpl | ||
var index embed.FS | ||
|
||
// Handler returns a http handler that servers OpenAPI console for an OpenAPI spec at specURL. | ||
func Handler(title, specURL string) http.HandlerFunc { | ||
t, _ := template.ParseFS(index, "index.tpl") | ||
|
||
return func(w http.ResponseWriter, req *http.Request) { | ||
_ = t.Execute(w, struct { | ||
Title string | ||
URL string | ||
}{ | ||
title, | ||
specURL, | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>{{ .Title }}</title> | ||
<link rel="stylesheet" type="text/css" href="//unpkg.com/swagger-ui-dist@latest/swagger-ui.css" /> | ||
<link rel="icon" type="image/png" href="//unpkg.com/swagger-ui-dist@latest/favicon-16x16.png" /> | ||
</head> | ||
<body> | ||
<div id="swagger-ui"></div> | ||
|
||
<script src="//unpkg.com/swagger-ui-dist@latest/swagger-ui-bundle.js"></script> | ||
<script> | ||
window.onload = function() { | ||
window.ui = SwaggerUIBundle({ | ||
url: {{ .URL }}, | ||
dom_id: "#swagger-ui", | ||
deepLinking: true, | ||
layout: "BaseLayout", | ||
}); | ||
} | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.