Hi,
I'm trying to write a proto file which has an option on a service and 
inside the option I'd like to have an option on one of the inner messages:

service SomeService {
    option (wix.api.genService) = {
            entity: "SomeServiceData"
            endpoints {
                create {
                    option(wix.api.metadata).name = "SOME_VALUE";
                };
            };
    };
}
This fails saying: "Message type "wix.api.GenEndpoint" has no field named 
"option"." (create is of type GenEndpoint).

I'm fairly certain I can change the inner option to be a regular field but 
then my developers will need to know two different syntax (one when they're 
using the highlevel transpiled DSL and the regular proto one for other 
tasks).
I can also change the top level "thing" to not be an option and instead be 
a typed message but this feels a bit iffy (maybe less than the above two 
options).

This test below seems to suggest what I want to do is achievable but I 
wasn't able to understand how to use it...
https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/unittest_custom_options.proto#L360

Would love your help,
Ittai

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/1b181bf3-7647-4b02-818d-3a9a0e01bde4%40googlegroups.com.

Reply via email to