[CORD-2871]
Fix protobuf integration in prep for CORD-2276
Change-Id: Ic614821d17675b1c70fe29bebdd11892bab99a32
diff --git a/lib/xos-genx/xosgenx/targets/protoapi.xtarget b/lib/xos-genx/xosgenx/targets/protoapi.xtarget
index c580764..183bacd 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 "google/api/annotations.proto";
+import "annotations.proto";
import "common.proto";
import "xosoptions.proto";
@@ -50,7 +50,7 @@
{% for object in proto.messages | sort(attribute='name')%}
{% if object.name != 'XOSBase' -%}
rpc List{{ object.name }}(google.protobuf.Empty) returns ({{ xproto_pluralize(object) }}) {
- option (google.api.http) = {
+ option (googleapi.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 (google.api.http) = {
+ option (googleapi.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 (google.api.http) = {
+ option (googleapi.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 (google.api.http) = {
+ option (googleapi.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 (google.api.http) = {
+ option (googleapi.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}"
};
}