I have an existing Web API project, which after running some tests, I want to start implementing protobuf. Using the Serializer.GetProto<>() method, I got the following data (showing just the beginning):
syntax = "proto2";
package MyProject.Models;
import "protobuf-net/bcl.proto"; // schema for protobuf-net's handling of core .NET types
message AssemblyComponentDetailsModel {
optional .bcl.Guid ID = 1 [default = 00000000-0000-0000-0000-000000000000];
optional string AssemblyName = 2;
optional string ReferenceNumber = 3;
optional .bcl.Guid TypeID = 4 [default = 00000000-0000-0000-0000-000000000000];
optional .bcl.Guid CategoryID = 5 [default = 00000000-0000-0000-0000-000000000000];
optional string Symbol = 6;
repeated ComponentDetailsModel ComponentDetails = 7;
optional .bcl.Decimal MsrpTotal = 8 [default = 0];
}
The frontend of the project is using Angular 7 and I am using the information on this page to implement it: https://medium.com/francesco-pongetti/using-protocol-buffers-in-a-node-js-angular-web-application-fba17df8ab51.
My question is, the proto file has the import statement import "protobuf-net/bcl.proto" and items from this file (e.g. optional .bcl.Guid) are being used. Is this going to cause issue deserializing in Angular? If so, what is the easiest way to go about fixing this? There are a lot of classes in the project and I am trying to avoid having to try and write all the .proto files by hand.
Any guidance/suggestions are greatly appreciated as this is the first time I'm working with protobuf on a real project.
Thank you in advance.