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

Add swagger for gRPC REST #7075

Merged
merged 34 commits into from
Aug 28, 2020
Merged
Changes from 3 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3913bd2
swagger gen command added
atheeshp Aug 17, 2020
2bbfd2e
proto file changed
atheeshp Aug 17, 2020
a13bffa
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 17, 2020
1bcdd34
Add filter for swagger files
anilcse Aug 20, 2020
355fb1c
Remove loop
anilcse Aug 20, 2020
60de7ac
Add go-swagger installation
anilcse Aug 20, 2020
e7ee599
Add swagger mixer command
anilcse Aug 20, 2020
4108303
add swagger options
anilcse Aug 21, 2020
c1ce287
remove files
anilcse Aug 21, 2020
4932f48
Fix swagger-combine
anilcse Aug 22, 2020
7babacc
Fix description
anilcse Aug 22, 2020
73a3078
remove unnecessary config option
anilcse Aug 22, 2020
148bce9
remove go-swagger dependency
anilcse Aug 22, 2020
0491866
refactor
anilcse Aug 22, 2020
eeeca44
Add proto-gen-swagger installation tool
anilcse Aug 22, 2020
a9b42cb
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
anilcse Aug 22, 2020
40d1eee
fix tool
anilcse Aug 22, 2020
3fe9a20
refactor
anilcse Aug 22, 2020
747e615
don't push individual swagger files to repo
anilcse Aug 22, 2020
7ced203
refactor
anilcse Aug 22, 2020
e1fcaaa
Fix doc
anilcse Aug 22, 2020
e951e6d
move proto-swagger-gen to a separate target
anilcse Aug 24, 2020
92d925a
Merge branch 'master' into atheesh/5921-swagger-gen
anilcse Aug 26, 2020
81e6289
Fix permissions
anilcse Aug 27, 2020
b219a4c
Merge branch 'master' into atheesh/5921-swagger-gen
anilcse Aug 27, 2020
e5f8ab9
Add ibc swagger gen
anilcse Aug 27, 2020
4518e3b
Merge branch 'atheesh/5921-swagger-gen' of github.com:cosmos/cosmos-s…
anilcse Aug 27, 2020
3f1b6d1
Update swagger generation doc
anilcse Aug 27, 2020
9461dd3
cleanup
anilcse Aug 27, 2020
05512e2
gofmt
anilcse Aug 27, 2020
41d8baf
refactor
anilcse Aug 27, 2020
1b77732
Merge branch 'master' into atheesh/5921-swagger-gen
anilcse Aug 27, 2020
6c63a04
Merge branch 'master' into atheesh/5921-swagger-gen
anilcse Aug 28, 2020
c26067d
update Makefile
fedekunze Aug 28, 2020
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
9 changes: 9 additions & 0 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -eo pipefail

proto_files=''

proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
protoc \
Expand All @@ -17,8 +19,15 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
-I "third_party/proto" \
--grpc-gateway_out=logtostderr=true:. \
$(find "${dir}" -maxdepth 1 -name '*.proto')

proto_files=${proto_files}" ${dir:2}/*.proto"
done

protoc ${proto_files} \
-I "proto" \
-I "third_party/proto" \
--swagger_out=allow_merge=true,logtostderr=true:.
anilcse marked this conversation as resolved.
Show resolved Hide resolved

# generate codec/testdata proto code
protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/proto.proto
Expand Down