Adding "google/api/annotations.proto" as a Dependency
While following instructions on configuring a gRPC gateway, an issue arises when attempting to import "google/api/annotations.proto" into the code. This occurs at step four of the gRPC gateway generation process.
The documentation indicates that third-party protobuf files are required for the protoc compiler. However, it does not provide explicit instructions on how to add these dependencies.
To resolve this issue, one approach is to add the third-party Google APIs and their associated content to the root directory of the project. Though it may seem unconventional, this method is reportedly recommended.
The above is the detailed content of How to Add 'google/api/annotations.proto' as a Dependency for gRPC Gateway?. For more information, please follow other related articles on the PHP Chinese website!