syntax = "proto3";
package dummy;
option java_package = "com.productservice.shirt";
option java_multiple_files = true;
/* ShirtInfo represents the basic fileds related to the static information
* of shirts */
message ShirtInfo {
string brand = 1;
string summary = 2;
string category = 3;
map<string, string> specifications = 4;
repeated string tags = 5;
}
/* ShirtInfo create response. When a new entry is made, returned response will
* be the id of the document. */
message CreateShirtInfoResponse {
string id = 1;
}
/* ShirtInfo reate request. Refer to the @ShirtInfo message.*/
message CreateShirtInfoRequest{
ShirtInfo request = 1;
}
/* Request object to get the @ShirtInfo based on the id provided.*/
message GetShirtInfoRequest{
string id = 1;
}
/* Respone object for getting @ShirtInfo based on id*/
message GetShirtInfoResponse{
ShirtInfo response = 1;
}
/* Request Object to update the existing @ShirtInfo*/
message UpdateShirtInfoRequest{
ShirtInfo request = 1;
}
/* Response object to the update request @UpdateShirtInfoRequest*/
message UpdateShirtInfoResponse{
ShirtInfo response = 1;
}
service ShirtStaticInfoService {
rpc createShirtInfo(CreateShirtInfoRequest) returns (CreateShirtInfoResponse) {};
rpc getShirtInfo(GetShirtInfoRequest) returns (GetShirtInfoResponse){};
rpc updateShirtInfo(UpdateShirtInfoRequest) returns (UpdateShirtInfoResponse){};
}
With the above .proto file, i have generated java files and implemented server side Service. Now I have made changes in the name of the service say from ShirtStaticInfoService to ShirtInfoService and generate the respective java files. To incorporate these changes in my Server side Service, I need to first comment out the code, build and then apply the changes. So, is there any way where the changes would automatically updated if there are any changes in .proto file.
Any help or reference would be greatly appreciated.