avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Fletcher <gffle...@aol.com>
Subject Doc strings in IDL not working
Date Thu, 01 Sep 2011 17:34:40 GMT
Hi,

I'm trying to use the velocity templates to extract doc strings from the 
IDL using my own SpecificCompiler.  The IDL file looks like this...

/** class=@AccessControl(group="normal") */
@namespace("com.aol.interfaces.echo")
protocol EchoService {

     import idl "Errors.avdl";

     /** Message structure for the echo service */
     record Message {
         /** the string to be echo'd */
         string echome;
         map<string> echoes;
     }

     /** method=@AccessControl(source="MyService") */
     string echoString(string msg) throws 
com.aol.interfaces.error.ServiceError;
     Message echoMessage(Message msg) throws 
com.aol.interfaces.error.ServiceError;

     void publishMessage(string msg) oneway;
}

I expected based on AVRO-296 
(https://issues.apache.org/jira/browse/AVRO-296) being part of 1.5.1 
that I should be able to get the doc strings from the parsed IDL. 
However, this doesn't appear to be working. In looking at the source 
code, it appears that doc strings are only saved for Enum, Fixed and Schema.

Given that doc strings are supported for Schemas, I expected to see the 
'Message structure for the echo service' in my generated java code. 
However, even with the default velocity templates this string isn't 
present in the generated files.

Has any else run into this? Do I just have some simple syntax error in 
my IDL? Is there are reason that the parser doesn't support doc strings 
for more of the types? (e.g. Messages?)

Thanks,
George


Mime
View raw message