I am getting .proto File not found error in below command
Command
protoc -I/usr/local/include -I. \
-I/home/xxUserxx/go/pkg/mod/github.com/mwitkow/go-proto-validators@v0.3.0/ \
-I/home/xxUserxx/go/src \
-I/home/xxUserxx/go/pkg/mod/github.com/xxOrgxx/xxPrivateRepoxx@v1.2.2/proto \
-I/home/xxUserxx/go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.9.2/third_party/googleapis \
--grpc-gateway_out=logtostderr=true,allow_repeated_fields_in_body=true:./proto \
--swagger_out=logtostderr=true,allow_repeated_fields_in_body=true:./proto \
--govalidators_out=./proto --go_out=plugins=grpc:./proto \
test1.proto test2.proto
Output: Below error is failing protoc.
github.com/mwitkow/go-proto-validators/validator.proto: File not found.
test1.proto:7:1: Import "github.com/mwitkow/go-proto-validators/validator.proto" was not found or had errors.
Edit1: Below is the test1.proto file as requested. Here line number 7 has validator.proto import
syntax = "proto3";
package proto;
option go_package = "proto";
import "google/api/annotations.proto";
import "github.com/mwitkow/go-proto-validators/validator.proto";
service TestService {
rpc GetTests(GetTestsRequest) returns (GetTestsResponse) {
option (google.api.http) = {
get: "/test"
};
}
}
message GetTestsRequest {
}
message GetTestsResponse {
repeated Test tests = 1;
}
message Test {
int64 id = 1;
string name = 2;
string description = 3;
int64 externalId = 4;
int64 providerId = 5;
bool isArchived = 6;
}