Google maintains a core protobuf library that has some shared models that are required to support some data types well: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf
For example:
- Map
dateTime fields (only naive with respect to time zone) into google.protobuf.Timestamp.
- Map
null to google.protobuf.NullValue.
- Map
void to google.protobuf.Empty
- Maybe map unknown models to
google.protobuf.Any
google.protobuf must be included somehow in the output directory (e.g. emitted by cadl-grpc alongside the user's packages) and types must be referenced using import declarations with a relative path, e.g.:
import "../../google/protobuf/empty.proto";
package "com.azure.Widgets";
service WidgetService {
rpc paint (PaintRequest) returns (google.protobuf.Empty);
}
Google maintains a core protobuf library that has some shared models that are required to support some data types well: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf
For example:
dateTimefields (only naive with respect to time zone) intogoogle.protobuf.Timestamp.nulltogoogle.protobuf.NullValue.voidtogoogle.protobuf.Emptygoogle.protobuf.Anygoogle.protobufmust be included somehow in the output directory (e.g. emitted by cadl-grpc alongside the user's packages) and types must be referenced usingimportdeclarations with a relative path, e.g.: