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

nitpick spacing in other proto files #1032

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
18 changes: 9 additions & 9 deletions examples/proto/examplepb/response_body_service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 41 additions & 37 deletions examples/proto/examplepb/response_body_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,54 @@ package grpc.gateway.examples.examplepb;

import "google/api/annotations.proto";

message ResponseBodyIn { string data = 1; }
message ResponseBodyIn {
string data = 1;
}

message ResponseBodyOut {
message Response { string data = 1; }
Response response = 2;
message Response {
string data = 1;
}
Response response = 2;
}

message RepeatedResponseBodyOut {
message Response {
string data = 1;
enum ResponseType {
// UNKNOWN
UNKNOWN = 0;
// A is 1
A = 1;
// B is 2
B = 2;
}
ResponseType type = 3;
}
repeated Response response = 2;
message Response {
string data = 1;
enum ResponseType {
// UNKNOWN
UNKNOWN = 0;
// A is 1
A = 1;
// B is 2
B = 2;
}
ResponseType type = 3;
}
repeated Response response = 2;
}

message RepeatedResponseStrings { repeated string values = 1; }
message RepeatedResponseStrings {
repeated string values = 1;
}

service ResponseBodyService {
rpc GetResponseBody(ResponseBodyIn) returns (ResponseBodyOut) {
option (google.api.http) = {
get : "/responsebody/{data}"
response_body : "response"
};
}

rpc ListResponseBodies(ResponseBodyIn) returns (RepeatedResponseBodyOut) {
option (google.api.http) = {
get : "/responsebodies/{data}"
response_body : "response"
};
}

rpc ListResponseStrings(ResponseBodyIn) returns (RepeatedResponseStrings) {
option (google.api.http) = {
get : "/responsestrings/{data}"
response_body : "values"
};
}
rpc GetResponseBody(ResponseBodyIn) returns (ResponseBodyOut) {
option (google.api.http) = {
get : "/responsebody/{data}"
response_body : "response"
};
}
rpc ListResponseBodies(ResponseBodyIn) returns (RepeatedResponseBodyOut) {
option (google.api.http) = {
get : "/responsebodies/{data}"
response_body : "response"
};
}
rpc ListResponseStrings(ResponseBodyIn) returns (RepeatedResponseStrings) {
option (google.api.http) = {
get : "/responsestrings/{data}"
response_body : "values"
};
}
}
4 changes: 2 additions & 2 deletions examples/proto/examplepb/unannotated_echo_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ service UnannotatedEchoService {
// The message posted as the id parameter will also be
// returned.
rpc Echo(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);

// EchoBody method receives a simple message and returns it.
rpc EchoBody(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);

// EchoDelete method receives a simple message and returns it.
// EchoDelete method receives a simple message and returns it.
rpc EchoDelete(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);
}
6 changes: 3 additions & 3 deletions examples/proto/examplepb/wrappers.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 60 additions & 60 deletions examples/proto/examplepb/wrappers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,64 +26,64 @@ service WrappersService {
};
}

rpc CreateStringValue(google.protobuf.StringValue) returns (google.protobuf.StringValue) {
option (google.api.http) = {
post: "/v1/testString"
body: "*"
};
}
rpc CreateInt32Value(google.protobuf.Int32Value) returns (google.protobuf.Int32Value) {
option (google.api.http) = {
post: "/v1/testInt32"
body: "*"
};
}
rpc CreateInt64Value(google.protobuf.Int64Value) returns (google.protobuf.Int64Value){
option (google.api.http) = {
post: "/v1/testInt64"
body: "*"
};
}
rpc CreateFloatValue(google.protobuf.FloatValue) returns (google.protobuf.FloatValue){
option (google.api.http) = {
post: "/v1/testFloat"
body: "*"
};
}
rpc CreateDoubleValue(google.protobuf.DoubleValue) returns (google.protobuf.DoubleValue){
option (google.api.http) = {
post: "/v1/testDouble"
body: "*"
};
}
rpc CreateBoolValue(google.protobuf.BoolValue) returns (google.protobuf.BoolValue){
option (google.api.http) = {
post: "/v1/testBool"
body: "*"
};
}
rpc CreateUInt32Value(google.protobuf.UInt32Value) returns (google.protobuf.UInt32Value){
option (google.api.http) = {
post: "/v1/testUint32"
body: "*"
};
}
rpc CreateUInt64Value(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value){
option (google.api.http) = {
post: "/v1/testUint64"
body: "*"
};
}
rpc CreateBytesValue(google.protobuf.BytesValue) returns (google.protobuf.BytesValue){
option (google.api.http) = {
post: "/v1/testBytes"
body: "*"
};
}
rpc CreateEmpty(google.protobuf.Empty) returns (google.protobuf.Empty){
option (google.api.http) = {
post: "/v1/testEmpty"
body: "*"
};
}
rpc CreateStringValue(google.protobuf.StringValue) returns (google.protobuf.StringValue) {
option (google.api.http) = {
post: "/v1/testString"
body: "*"
};
}
rpc CreateInt32Value(google.protobuf.Int32Value) returns (google.protobuf.Int32Value) {
option (google.api.http) = {
post: "/v1/testInt32"
body: "*"
};
}
rpc CreateInt64Value(google.protobuf.Int64Value) returns (google.protobuf.Int64Value){
option (google.api.http) = {
post: "/v1/testInt64"
body: "*"
};
}
rpc CreateFloatValue(google.protobuf.FloatValue) returns (google.protobuf.FloatValue){
option (google.api.http) = {
post: "/v1/testFloat"
body: "*"
};
}
rpc CreateDoubleValue(google.protobuf.DoubleValue) returns (google.protobuf.DoubleValue){
option (google.api.http) = {
post: "/v1/testDouble"
body: "*"
};
}
rpc CreateBoolValue(google.protobuf.BoolValue) returns (google.protobuf.BoolValue){
option (google.api.http) = {
post: "/v1/testBool"
body: "*"
};
}
rpc CreateUInt32Value(google.protobuf.UInt32Value) returns (google.protobuf.UInt32Value){
option (google.api.http) = {
post: "/v1/testUint32"
body: "*"
};
}
rpc CreateUInt64Value(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value){
option (google.api.http) = {
post: "/v1/testUint64"
body: "*"
};
}
rpc CreateBytesValue(google.protobuf.BytesValue) returns (google.protobuf.BytesValue){
option (google.api.http) = {
post: "/v1/testBytes"
body: "*"
};
}
rpc CreateEmpty(google.protobuf.Empty) returns (google.protobuf.Empty){
option (google.api.http) = {
post: "/v1/testEmpty"
body: "*"
};
}
}