forked from pactflow/pact-protobuf-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
905967e
commit 7af25bc
Showing
5 changed files
with
99 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
tonic_build::configure().include_file("mod.rs").compile( | ||
&["primary/primary.proto", "imported/imported.proto"], | ||
&["."], | ||
)?; | ||
Ok(()) | ||
tonic_build::configure().include_file("mod.rs").compile( | ||
&[ | ||
"primary/primary.proto", | ||
"imported/imported.proto", | ||
"zimported/zimported.proto", | ||
], | ||
&["."], | ||
)?; | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
integrated_tests/imported_message/zimported/zimported.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
syntax = "proto3"; | ||
|
||
option go_package = "github.com/pact-foundation/pact-go/v2/examples/grpc/zimported"; | ||
option java_multiple_files = true; | ||
option java_package = "io.grpc.examples.zimported"; | ||
option java_outer_classname = "ImportedProto"; | ||
|
||
package zimported; | ||
|
||
service ZImported { | ||
rpc GetRectangle(RectangleLocationRequest) returns (RectangleLocationResponse) {} | ||
} | ||
|
||
message Rectangle { | ||
// The width of the rectangle. | ||
int32 zwidth = 1; | ||
|
||
// The length of the rectangle. | ||
int32 zlength = 2; | ||
} | ||
|
||
// Request message for GetRectangle method. This message has different fields, | ||
// but the same name as a message defined in primary.proto | ||
message RectangleLocationRequest { | ||
int32 zx = 1; | ||
int32 zb = 2; | ||
} | ||
|
||
// Response message for GetRectangle method. This message has different fields, | ||
// but the same name as a message defined in primary.proto | ||
message RectangleLocationResponse { | ||
Point zlocation = 1; | ||
} | ||
|
||
message Point { | ||
int32 zlatitude = 1; | ||
int32 zlongitude = 2; | ||
} |