Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: proto dependencies for downgrade to 0.45 #1933

Merged
merged 3 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions docs/client/gaia/globalfee/v1beta1/query.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"swagger": "2.0",
"info": {
"title": "gaia/globalfee/v1beta1/query.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/gaia/globalfee/v1beta1/minimum_gas_prices": {
"get": {
"operationId": "MinimumGasPrices",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gaia.globalfee.v1beta1.QueryMinimumGasPricesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
}
},
"tags": [
"Query"
]
}
}
},
"definitions": {
"cosmos.base.v1beta1.DecCoin": {
"type": "object",
"properties": {
"denom": {
"type": "string"
},
"amount": {
"type": "string"
}
},
"description": "DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."
},
"gaia.globalfee.v1beta1.QueryMinimumGasPricesResponse": {
"type": "object",
"properties": {
"minimum_gas_prices": {
"type": "array",
"items": {
"$ref": "#/definitions/cosmos.base.v1beta1.DecCoin"
}
}
},
"description": "QueryMinimumGasPricesResponse is the response type for the\nQuery/MinimumGasPrices RPC method."
},
"google.protobuf.Any": {
"type": "object",
"properties": {
"type_url": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"grpc.gateway.runtime.Error": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/google.protobuf.Any"
}
}
}
}
}
}
81 changes: 40 additions & 41 deletions docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,48 @@

## Table of Contents

- [gaia/globalfee/v1beta1/genesis.proto](#gaia/globalfee/v1beta1/genesis.proto)
- [GenesisState](#gaia.globalfee.v1beta1.GenesisState)
- [Params](#gaia.globalfee.v1beta1.Params)

- [gaia/globalfee/v1beta1/query.proto](#gaia/globalfee/v1beta1/query.proto)
- [QueryMinimumGasPricesRequest](#gaia.globalfee.v1beta1.QueryMinimumGasPricesRequest)
- [QueryMinimumGasPricesResponse](#gaia.globalfee.v1beta1.QueryMinimumGasPricesResponse)

- [Query](#gaia.globalfee.v1beta1.Query)


- [gaia/globalfee/v1beta1/genesis.proto](#gaia/globalfee/v1beta1/genesis.proto)
- [GenesisState](#gaia.globalfee.v1beta1.GenesisState)
- [Params](#gaia.globalfee.v1beta1.Params)

- [Scalar Value Types](#scalar-value-types)



<a name="gaia/globalfee/v1beta1/genesis.proto"></a>
<a name="gaia/globalfee/v1beta1/query.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## gaia/globalfee/v1beta1/genesis.proto


## gaia/globalfee/v1beta1/query.proto

<a name="gaia.globalfee.v1beta1.GenesisState"></a>

### GenesisState
GenesisState - initial state of module

<a name="gaia.globalfee.v1beta1.QueryMinimumGasPricesRequest"></a>

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#gaia.globalfee.v1beta1.Params) | | Params of this module |
### QueryMinimumGasPricesRequest
QueryMinimumGasPricesRequest is the request type for the
Query/MinimumGasPrices RPC method.






<a name="gaia.globalfee.v1beta1.Params"></a>
<a name="gaia.globalfee.v1beta1.QueryMinimumGasPricesResponse"></a>

### Params
Params defines the set of module parameters.
### QueryMinimumGasPricesResponse
QueryMinimumGasPricesResponse is the response type for the
Query/MinimumGasPrices RPC method.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `minimum_gas_prices` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | Minimum stores the minimum gas price(s) for all TX on the chain. When multiple coins are defined then they are accepted alternatively. The list must be sorted by denoms asc. No duplicate denoms or zero amount values allowed. For more information see https://docs.cosmos.network/main/modules/auth#concepts |
| `minimum_gas_prices` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | |



Expand All @@ -60,38 +57,51 @@ Params defines the set of module parameters.

<!-- end HasExtensions -->


<a name="gaia.globalfee.v1beta1.Query"></a>

### Query
Query defines the gRPC querier service.

| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `MinimumGasPrices` | [QueryMinimumGasPricesRequest](#gaia.globalfee.v1beta1.QueryMinimumGasPricesRequest) | [QueryMinimumGasPricesResponse](#gaia.globalfee.v1beta1.QueryMinimumGasPricesResponse) | | GET|/gaia/globalfee/v1beta1/minimum_gas_prices|

<!-- end services -->



<a name="gaia/globalfee/v1beta1/query.proto"></a>
<a name="gaia/globalfee/v1beta1/genesis.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## gaia/globalfee/v1beta1/query.proto
## gaia/globalfee/v1beta1/genesis.proto



<a name="gaia.globalfee.v1beta1.QueryMinimumGasPricesRequest"></a>
<a name="gaia.globalfee.v1beta1.GenesisState"></a>

### QueryMinimumGasPricesRequest
QueryMinimumGasPricesRequest is the request type for the
Query/MinimumGasPrices RPC method.
### GenesisState
GenesisState - initial state of module


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#gaia.globalfee.v1beta1.Params) | | Params of this module |




<a name="gaia.globalfee.v1beta1.QueryMinimumGasPricesResponse"></a>

### QueryMinimumGasPricesResponse
QueryMinimumGasPricesResponse is the response type for the
Query/MinimumGasPrices RPC method.

<a name="gaia.globalfee.v1beta1.Params"></a>

### Params
Params defines the set of module parameters.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `minimum_gas_prices` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | |
| `minimum_gas_prices` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | Minimum stores the minimum gas price(s) for all TX on the chain. When multiple coins are defined then they are accepted alternatively. The list must be sorted by denoms asc. No duplicate denoms or zero amount values allowed. For more information see https://docs.cosmos.network/main/modules/auth#concepts |



Expand All @@ -103,21 +113,10 @@ Query/MinimumGasPrices RPC method.

<!-- end HasExtensions -->


<a name="gaia.globalfee.v1beta1.Query"></a>

### Query
Query defines the gRPC querier service.

| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `MinimumGasPrices` | [QueryMinimumGasPricesRequest](#gaia.globalfee.v1beta1.QueryMinimumGasPricesRequest) | [QueryMinimumGasPricesResponse](#gaia.globalfee.v1beta1.QueryMinimumGasPricesResponse) | | GET|/gaia/globalfee/v1beta1/minimum_gas_prices|

<!-- end services -->




## Scalar Value Types

| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
Expand Down
17 changes: 0 additions & 17 deletions proto/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions proto/buf.gen.doc.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions proto/buf.gen.gogo.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions proto/buf.gen.swagger.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions proto/buf.lock

This file was deleted.

3 changes: 0 additions & 3 deletions proto/buf.md

This file was deleted.

21 changes: 0 additions & 21 deletions proto/buf.yaml

This file was deleted.

10 changes: 7 additions & 3 deletions proto/scripts/protoc-doc-gen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

cd proto
buf generate --template buf.gen.doc.yaml
cd ..
# command to generate docs using protoc-gen-doc
protoc \
-I "proto" \
-I "third_party/proto" \
--doc_out=./docs/proto \
--doc_opt=./docs/proto/protodoc-markdown.tmpl,proto-docs.md \
$(find "proto" -maxdepth 5 -name '*.proto')
22 changes: 9 additions & 13 deletions proto/scripts/protoc-swagger-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@

set -eo pipefail

mkdir -p ./tmp-swagger-gen
cd proto
proto_dirs=$(find ./gaia -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
mkdir -p ./docs/client
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do

# generate swagger files (filter query files)
query_file=$(find "${dir}" -maxdepth 1 \( -name 'query.proto' -o -name 'service.proto' \))
if [[ ! -z "$query_file" ]]; then
buf generate --template buf.gen.swagger.yaml $query_file
protoc \
-I "proto" \
-I "third_party/proto" \
"$query_file" \
--swagger_out=./docs/client \
--swagger_opt=logtostderr=true --swagger_opt=fqn_for_swagger_name=true --swagger_opt=simple_operation_ids=true
fi
done

cd ..
# combine swagger files
# uses nodejs package `swagger-combine`.
# all the individual swagger files need to be configured in `config.json` for merging
swagger-combine ./client/docs/config.json -o ./client/docs/swagger-ui/swagger.yaml -f yaml --continueOnConflictingPaths true --includeDefinitions true

# clean swagger files
rm -rf ./tmp-swagger-gen
Loading