From b6b1d655cf70c8c90c3077cf11a92dfa04304ea8 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Thu, 17 Dec 2020 11:16:48 +0100 Subject: [PATCH 1/3] Fix proto-swagger-gen --- Makefile | 2 +- scripts/protoc-swagger-gen.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f9011d13d3b8..b734c4181a07 100644 --- a/Makefile +++ b/Makefile @@ -374,7 +374,7 @@ proto-gen-any: $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh proto-swagger-gen: - @./scripts/protoc-swagger-gen.sh + $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protoc-swagger-gen.sh proto-lint: @$(DOCKER_BUF) check lint --error-format=json diff --git a/scripts/protoc-swagger-gen.sh b/scripts/protoc-swagger-gen.sh index 0813db381242..e8879fffb129 100755 --- a/scripts/protoc-swagger-gen.sh +++ b/scripts/protoc-swagger-gen.sh @@ -9,7 +9,7 @@ for dir in $proto_dirs; do # generate swagger files (filter query files) query_file=$(find "${dir}" -maxdepth 1 -name 'query.proto') if [[ ! -z "$query_file" ]]; then - protoc \ + buf protoc \ -I "proto" \ -I "third_party/proto" \ "$query_file" \ From a42acd0dce7ce9245d845a692532cda4e9eacb11 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Fri, 18 Dec 2020 15:15:18 +0100 Subject: [PATCH 2/3] Fix script --- Makefile | 2 +- scripts/protoc-swagger-gen.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b734c4181a07..f9011d13d3b8 100644 --- a/Makefile +++ b/Makefile @@ -374,7 +374,7 @@ proto-gen-any: $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh proto-swagger-gen: - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protoc-swagger-gen.sh + @./scripts/protoc-swagger-gen.sh proto-lint: @$(DOCKER_BUF) check lint --error-format=json diff --git a/scripts/protoc-swagger-gen.sh b/scripts/protoc-swagger-gen.sh index e8879fffb129..7a6c62534091 100755 --- a/scripts/protoc-swagger-gen.sh +++ b/scripts/protoc-swagger-gen.sh @@ -13,8 +13,8 @@ for dir in $proto_dirs; do -I "proto" \ -I "third_party/proto" \ "$query_file" \ - --swagger_out ./tmp-swagger-gen \ - --swagger_opt logtostderr=true --swagger_opt fqn_for_swagger_name=true --swagger_opt simple_operation_ids=true + --swagger_out=./tmp-swagger-gen \ + --swagger_opt=logtostderr=true --swagger_opt=fqn_for_swagger_name=true --swagger_opt=simple_operation_ids=true fi done From cde33575deed779d9afa16136548162719449416 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Fri, 18 Dec 2020 15:15:44 +0100 Subject: [PATCH 3/3] Run script --- client/docs/swagger-ui/swagger.yaml | 128 +++++++++++++++++++++++----- 1 file changed, 107 insertions(+), 21 deletions(-) diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index f2511287688a..568270cae8c8 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -22752,12 +22752,23 @@ paths: given connection. prefix: - title: commitment merkle prefix of the counterparty chain + description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will + be append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. description: >- IdentifiedConnection defines a connection with additional connection @@ -23099,11 +23110,11 @@ paths: the IBC verison in the connection handshake. - title: >- + description: >- IBC version which can be utilised to determine encodings or protocols for - channels or packets utilising this connection + channels or packets utilising this connection. state: description: current state of the connection end. type: string @@ -23132,18 +23143,35 @@ paths: given connection. prefix: - title: commitment merkle prefix of the counterparty chain + description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can + be used for packet-verification + + NOTE: delay period logic is only implemented by some + clients. description: >- ConnectionEnd defines a stateful object on a chain connected to another - separate one. NOTE: there must only be 2 defined - ConnectionEnds to establish + separate one. + + NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains. proof: @@ -34685,11 +34713,11 @@ definitions: verison in the connection handshake. - title: >- + description: >- IBC version which can be utilised to determine encodings or protocols for - channels or packets utilising this connection + channels or packets utilising this connection. state: description: current state of the connection end. type: string @@ -34718,18 +34746,31 @@ definitions: given connection. prefix: - title: commitment merkle prefix of the counterparty chain + description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte - description: >- - ConnectionEnd defines a stateful object on a chain connected to another + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, - separate one. NOTE: there must only be 2 defined ConnectionEnds to - establish + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can be used for + packet-verification + NOTE: delay period logic is only implemented by some clients. + description: |- + ConnectionEnd defines a stateful object on a chain connected to another + separate one. + NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains. ibc.core.connection.v1.Counterparty: type: object @@ -34749,12 +34790,19 @@ definitions: given connection. prefix: - title: commitment merkle prefix of the counterparty chain + description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) description: >- Counterparty defines the counterparty chain associated with a connection end. @@ -34818,12 +34866,23 @@ definitions: given connection. prefix: - title: commitment merkle prefix of the counterparty chain + description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. description: |- IdentifiedConnection defines a connection with additional connection identifier field. @@ -35304,11 +35363,11 @@ definitions: verison in the connection handshake. - title: >- + description: >- IBC version which can be utilised to determine encodings or protocols for - channels or packets utilising this connection + channels or packets utilising this connection. state: description: current state of the connection end. type: string @@ -35337,18 +35396,34 @@ definitions: given connection. prefix: - title: commitment merkle prefix of the counterparty chain + description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can be used + for packet-verification + + NOTE: delay period logic is only implemented by some clients. description: >- ConnectionEnd defines a stateful object on a chain connected to another - separate one. NOTE: there must only be 2 defined ConnectionEnds to - establish + separate one. + + NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains. proof: @@ -35452,12 +35527,23 @@ definitions: given connection. prefix: - title: commitment merkle prefix of the counterparty chain + description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. description: |- IdentifiedConnection defines a connection with additional connection identifier field.