Consider this Cadl spec:
@package("com.azure.A")
namespace A {
@service Foo {
bar(...B.Request): void;
}
}
@package("com.azure.B")
namespace B {
model Request {
@field(1)
name: string;
}
}
The definition of the service Foo will be generated as part of com/azure/A.proto and the message will be generated as part of com/azure/B.proto, so we need to have a way to import and use the qualified names of each type when cross-package references are used:
com/azure/A.proto:
import "../../google/protobuf/Empty.proto";
import "./B.proto";
package "com.azure.A";
service Foo {
rpc bar (com.azure.B.Request) returns (google.protobuf.Empty);
}
com/azure/B.proto:
package "com.azure.B";
message Request {
string name = 1;
}
Consider this Cadl spec:
The definition of the service
Foowill be generated as part ofcom/azure/A.protoand the message will be generated as part ofcom/azure/B.proto, so we need to have a way to import and use the qualified names of each type when cross-package references are used:com/azure/A.proto:com/azure/B.proto: