mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-20 15:05:21 +00:00
Fix proto-gen after docs removal (#1196)
* add back proto docs template * ignore all third party packages from proto lint * generate missing proto docs/linting * update old branch name for proto-check-breaking * remove dependency changes from proto generation * remove no longer needed docs cmds from makefile * use v0.3 dev image w/ go 1.17; add go mod tidy back Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
This commit is contained in:
parent
f0fa2e1253
commit
3b187011bb
19
Makefile
19
Makefile
@ -146,7 +146,7 @@ start:
|
||||
### Protobuf ###
|
||||
###############################################################################
|
||||
|
||||
protoVer=v0.2
|
||||
protoVer=v0.3
|
||||
protoImageName=tendermintdev/sdk-proto-gen:$(protoVer)
|
||||
containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer)
|
||||
containerProtoGenAny=$(PROJECT_NAME)-proto-gen-any-$(protoVer)
|
||||
@ -174,7 +174,7 @@ proto-lint:
|
||||
@$(DOCKER_BUF) lint --error-format=json
|
||||
|
||||
proto-check-breaking:
|
||||
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=upgrade-v44
|
||||
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=master
|
||||
|
||||
GOOGLE_PROTO_URL = https://raw.githubusercontent.com/googleapis/googleapis/master/google/api
|
||||
PROTOBUF_GOOGLE_URL = https://raw.githubusercontent.com/protocolbuffers/protobuf/master/src/google/protobuf
|
||||
@ -265,18 +265,3 @@ start-remote-sims:
|
||||
-—container-override environment=[{SIM_NAME=master-$(VERSION)}]
|
||||
|
||||
.PHONY: all build-linux install clean build test test-cli test-all test-rest test-basic start-remote-sims
|
||||
|
||||
########################################
|
||||
### Documentation
|
||||
|
||||
# Start docs site at localhost:8080
|
||||
docs-develop:
|
||||
@cd docs && \
|
||||
npm install && \
|
||||
npm run serve
|
||||
|
||||
# Build the site into docs/.vuepress/dist
|
||||
docs-build:
|
||||
@cd docs && \
|
||||
npm install && \
|
||||
npm run build
|
||||
|
@ -1099,7 +1099,9 @@ paths:
|
||||
properties:
|
||||
max_auction_duration:
|
||||
type: string
|
||||
bid_duration:
|
||||
forward_bid_duration:
|
||||
type: string
|
||||
reverse_bid_duration:
|
||||
type: string
|
||||
increment_surplus:
|
||||
type: string
|
||||
@ -50359,7 +50361,9 @@ definitions:
|
||||
properties:
|
||||
max_auction_duration:
|
||||
type: string
|
||||
bid_duration:
|
||||
forward_bid_duration:
|
||||
type: string
|
||||
reverse_bid_duration:
|
||||
type: string
|
||||
increment_surplus:
|
||||
type: string
|
||||
@ -50745,7 +50749,9 @@ definitions:
|
||||
properties:
|
||||
max_auction_duration:
|
||||
type: string
|
||||
bid_duration:
|
||||
forward_bid_duration:
|
||||
type: string
|
||||
reverse_bid_duration:
|
||||
type: string
|
||||
increment_surplus:
|
||||
type: string
|
||||
|
5682
docs/core/proto-docs.md
Normal file
5682
docs/core/proto-docs.md
Normal file
File diff suppressed because it is too large
Load Diff
105
docs/protodoc-markdown.tmpl
Normal file
105
docs/protodoc-markdown.tmpl
Normal file
@ -0,0 +1,105 @@
|
||||
<!-- This file is auto-generated. Please do not modify it yourself. -->
|
||||
# Protobuf Documentation
|
||||
<a name="top"></a>
|
||||
|
||||
## Table of Contents
|
||||
{{range .Files}}
|
||||
{{$file_name := .Name}}- [{{.Name}}](#{{.Name}})
|
||||
{{- if .Messages }}
|
||||
{{range .Messages}} - [{{.LongName}}](#{{.FullName}})
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
{{- if .Enums }}
|
||||
{{range .Enums}} - [{{.LongName}}](#{{.FullName}})
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
{{- if .Extensions }}
|
||||
{{range .Extensions}} - [File-level Extensions](#{{$file_name}}-extensions)
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
{{- if .Services }}
|
||||
{{range .Services}} - [{{.Name}}](#{{.FullName}})
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
- [Scalar Value Types](#scalar-value-types)
|
||||
|
||||
{{range .Files}}
|
||||
{{$file_name := .Name}}
|
||||
<a name="{{.Name}}"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## {{.Name}}
|
||||
{{.Description}}
|
||||
|
||||
{{range .Messages}}
|
||||
<a name="{{.FullName}}"></a>
|
||||
|
||||
### {{.LongName}}
|
||||
{{.Description}}
|
||||
|
||||
{{if .HasFields}}
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
{{range .Fields -}}
|
||||
| `{{.Name}}` | [{{.LongType}}](#{{.FullType}}) | {{.Label}} | {{if (index .Options "deprecated"|default false)}}**Deprecated.** {{end}}{{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} |
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{if .HasExtensions}}
|
||||
| Extension | Type | Base | Number | Description |
|
||||
| --------- | ---- | ---- | ------ | ----------- |
|
||||
{{range .Extensions -}}
|
||||
| `{{.Name}}` | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} |
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{end}} <!-- end messages -->
|
||||
|
||||
{{range .Enums}}
|
||||
<a name="{{.FullName}}"></a>
|
||||
|
||||
### {{.LongName}}
|
||||
{{.Description}}
|
||||
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
{{range .Values -}}
|
||||
| {{.Name}} | {{.Number}} | {{nobr .Description}} |
|
||||
{{end}}
|
||||
|
||||
{{end}} <!-- end enums -->
|
||||
|
||||
{{if .HasExtensions}}
|
||||
<a name="{{$file_name}}-extensions"></a>
|
||||
|
||||
### File-level Extensions
|
||||
| Extension | Type | Base | Number | Description |
|
||||
| --------- | ---- | ---- | ------ | ----------- |
|
||||
{{range .Extensions -}}
|
||||
| `{{.Name}}` | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} |
|
||||
{{end}}
|
||||
{{end}} <!-- end HasExtensions -->
|
||||
|
||||
{{range .Services}}
|
||||
<a name="{{.FullName}}"></a>
|
||||
|
||||
### {{.Name}}
|
||||
{{.Description}}
|
||||
|
||||
| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
|
||||
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
|
||||
{{range .Methods -}}
|
||||
| `{{.Name}}` | [{{.RequestLongType}}](#{{.RequestFullType}}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseFullType}}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | {{with (index .Options "google.api.http")}}{{range .Rules}}{{.Method}}|{{.Pattern}}{{end}}{{end}}|
|
||||
{{end}}
|
||||
{{end}} <!-- end services -->
|
||||
|
||||
{{end}}
|
||||
|
||||
## Scalar Value Types
|
||||
|
||||
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|
||||
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
|
||||
{{range .Scalars -}}
|
||||
| <a name="{{.ProtoType}}" /> {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} | {{.GoType}} | {{.CSharp}} | {{.PhpType}} | {{.RubyType}} |
|
||||
{{end}}
|
@ -4,7 +4,7 @@ package kava.savings.v1beta1;
|
||||
import "kava/savings/v1beta1/store.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
|
||||
// GenesisState defines the savings module's genesis state.
|
||||
message GenesisState {
|
||||
|
@ -7,7 +7,7 @@ import "google/api/annotations.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
|
||||
// Query defines the gRPC querier service for savings module
|
||||
service Query {
|
||||
@ -20,7 +20,6 @@ service Query {
|
||||
rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) {
|
||||
option (google.api.http).get = "/kava/savings/v1beta1/deposits";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// QueryParamsRequest defines the request type for querying x/savings
|
||||
|
@ -5,21 +5,21 @@ import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
// Params defines the parameters for the savings module.
|
||||
message Params {
|
||||
repeated string supported_denoms = 1;
|
||||
repeated string supported_denoms = 1;
|
||||
}
|
||||
|
||||
// Deposit defines an amount of coins deposited into a savings module account.
|
||||
message Deposit {
|
||||
string depositor = 1 [
|
||||
(cosmos_proto.scalar) = "cosmos.AddressBytes",
|
||||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
|
||||
];
|
||||
string depositor = 1 [
|
||||
(cosmos_proto.scalar) = "cosmos.AddressBytes",
|
||||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
|
||||
];
|
||||
|
||||
repeated cosmos.base.v1beta1.Coin amount = 2
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
||||
}
|
||||
repeated cosmos.base.v1beta1.Coin amount = 2
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
@ -5,12 +5,12 @@ import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
||||
|
||||
// Msg defines the savings Msg service.
|
||||
service Msg {
|
||||
// Deposit defines a method for depositing funds to the savings module account
|
||||
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
|
||||
// Deposit defines a method for depositing funds to the savings module account
|
||||
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
|
||||
}
|
||||
|
||||
// MsgDeposit defines the Msg/Deposit request type.
|
||||
|
4
third_party/proto/buf.yaml
vendored
4
third_party/proto/buf.yaml
vendored
@ -6,4 +6,6 @@ lint:
|
||||
- cosmos_proto
|
||||
- gogoproto
|
||||
- google
|
||||
- tendermint
|
||||
- ibc
|
||||
- tendermint
|
||||
- proofs.proto
|
Loading…
Reference in New Issue
Block a user