Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
add swagger generate srcipt and swagger definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinker1991 committed Apr 12, 2018
1 parent b246447 commit fd8b9a3
Show file tree
Hide file tree
Showing 3 changed files with 521 additions and 2 deletions.
10 changes: 9 additions & 1 deletion gen-proto.sh
Expand Up @@ -18,4 +18,12 @@ protoc -I=./protocol \
protoc -I=./protocol \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--grpc-gateway_out=logtostderr=true:../../../ \
./protocol/api/*.proto
./protocol/api/*.proto


# (Optional) Generate swagger definitions
protoc -I./protocol \
-I$GOPATH/src \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--swagger_out=logtostderr=true:../../../ \
./protocol/api/*.proto
2 changes: 1 addition & 1 deletion protocol/api/api.proto
Expand Up @@ -14,7 +14,7 @@ service Wallet {

rpc GetAccount (Account) returns (Account) {
option (google.api.http) = {
post: "v1/account"
post: "/v1/account"
body: "*"
};

Expand Down

0 comments on commit fd8b9a3

Please sign in to comment.