Use google.api instead of custom googleapi package
Use the standard google.api package to not create conflicts with other
proto definition that uses the same package.
Change-Id: Ic66a0a1a0f1e68c95fd94f443112ee4fb8b1bad5
diff --git a/lib/xos-genx/xosgenx/targets/protoapi.xtarget b/lib/xos-genx/xosgenx/targets/protoapi.xtarget
index 0359c46..65e0d26 100644
--- a/lib/xos-genx/xosgenx/targets/protoapi.xtarget
+++ b/lib/xos-genx/xosgenx/targets/protoapi.xtarget
@@ -3,7 +3,7 @@
package xos;
import "google/protobuf/empty.proto";
-import "annotations.proto";
+import "google/api/annotations.proto";
import "common.proto";
import "xosoptions.proto";
@@ -50,7 +50,7 @@
{% for object in proto.messages | selectattr("is_included") | sort(attribute='name')%}
{% if object.name != 'XOSBase' -%}
rpc List{{ object.name }}(google.protobuf.Empty) returns ({{ xproto_pluralize(object) }}) {
- option (googleapi.http) = {
+ option (google.api.http) = {
{%- if object.name=='CordSubscriberRoot' %}
get: "/xosapi/v1/rcord/{{ xproto_pluralize(object) | lower }}"
{%- else %}
@@ -61,7 +61,7 @@
rpc Filter{{ object.name }}(Query) returns ({{ xproto_pluralize(object) }}) {
}
rpc Get{{ object.name }}(ID) returns ({{ object.name }}) {
- option (googleapi.http) = {
+ option (google.api.http) = {
{%- if object.name=='CordSubscriberRoot' %}
get: "/xosapi/v1/rcord/{{ xproto_pluralize(object) | lower }}/{id}"
{%- else %}
@@ -70,19 +70,19 @@
};
}
rpc Create{{ object.name }}({{ object.name }}) returns ({{ object.name }}) {
- option (googleapi.http) = {
+ option (google.api.http) = {
post: "/xosapi/v1/{{ xproto_unquote(xproto_first_non_empty([object.options.name, object.options.app_label, options.name, context.app_label])) }}/{{ xproto_pluralize(object) | lower }}"
body: "*"
};
}
rpc Update{{ object.name }}({{ object.name }}) returns ({{ object.name }}) {
- option (googleapi.http) = {
+ option (google.api.http) = {
put: "/xosapi/v1/{{ xproto_unquote(xproto_first_non_empty([object.options.name, object.options.app_label, options.name, context.app_label])) }}/{{ xproto_pluralize(object) | lower }}/{id}"
body: "*"
};
}
rpc Delete{{ object.name }}(ID) returns (google.protobuf.Empty) {
- option (googleapi.http) = {
+ option (google.api.http) = {
delete: "/xosapi/v1/{{ xproto_unquote(xproto_first_non_empty([object.options.name, object.options.app_label, options.name, context.app_label])) }}/{{ xproto_pluralize(object) | lower }}/{id}"
};
}