lnrpc: split REST annotations into service files
As a preparation for the migration to the grpc-gateway/v2 library we declare each service's REST annotations in its own file. This is optional in the v1 library but mandatory in v2.
This commit is contained in:
15 files changed
+381
-343
No files matched your search
+3
-2
@@ -20,14 +20,15 @@ function generate() {
|
||||
"${file}"
|
||||
|
||||
# Generate the REST reverse proxy.
|
||||
annotationsFile=${file//proto/yaml}
|
||||
protoc -I/usr/local/include -I. \
|
||||
--grpc-gateway_out=logtostderr=true,paths=source_relative,grpc_api_configuration=rest-annotations.yaml:. \
|
||||
--grpc-gateway_out=logtostderr=true,paths=source_relative,grpc_api_configuration=${annotationsFile}:. \
|
||||
"${file}"
|
||||
|
||||
|
||||
# Finally, generate the swagger file which describes the REST API in detail.
|
||||
protoc -I/usr/local/include -I. \
|
||||
--swagger_out=logtostderr=true,grpc_api_configuration=rest-annotations.yaml:. \
|
||||
--swagger_out=logtostderr=true,grpc_api_configuration=${annotationsFile}:. \
|
||||
"${file}"
|
||||
done
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user