Hi there!
I have an error when trying to register a protobuf schema in the Schema Registry using the API:
{
"error_code": 42201,
"message": "Invalid schema {subject=test,version=0,id=-1,schemaType=PROTOBUF,references=[ ],schema=syntax = 'proto3';package Test;import 'google/protobuf/timestamp.proto';message EventProto {int64 Id = 1;int32 CustomerId = 2;int32 ContractId = 3;google.protobuf.Timestamp StartDate = 4;google.protobuf.Timestamp EndDate = 5;}}"
}
I invoke the Post subjects/Test/versions with the following json:
{
"schema": "syntax = 'proto3';package Test;import 'google/protobuf/timestamp.proto';message EventProto {int64 Id = 1;int32 CustomerId = 2;int32 ContractId = 3;google.protobuf.Timestamp StartDate = 4;google.protobuf.Timestamp EndDate = 5;}",
"schemaType": "PROTOBUF"
}
Below is the proto file:
syntax = 'proto3';
package Test;
import 'google/protobuf/timestamp.proto';
message EventProto {
int64 Id = 1;
int32 CustomerId = 2;
int32 ContractId = 3;
google.protobuf.Timestamp StartDate = 4;
google.protobuf.Timestamp EndDate = 5;
}
If I remove the google.protobuf.Timestamp fields I can register the schema.
Could you kindly help me?
Thanks a lot