[
https://issues.apache.org/jira/browse/AVRO-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Philip Zeyliger updated AVRO-152:
---------------------------------
Attachment: AVRO-149.patch.txt
If you want to follow along how this patch developed, see
http://github.com/philz/avro/tree/docs
This patch, which won't apply without AVRO-149 (though I could make it
independent, if that proves to be useful; I sense that 149 will go in first,
though), does the following:
* Updates the spec to understand "doc" for records (both for the record class
and its fields) and enums (only for the enum class). I haven't dealt with the
enum values themselves, because they're specified as an array, so don't have a
natural place to put the "doc". I could make it a parallel array, of course,
but for now I've left it off. I've also not annotated protocols with "docs",
though they deserve the same treatment.
* Everywhere where Schema and Field previous just had name, there's now "name,
doc". That code was largely limited to Schema.java, so it wasn't a big deal.
* I did minor refactoring and clean-up in Schema.java, and made TestSchema.java
run all of its schemas through the SpecificCompiler.
* I changed SpecificCompiler to output to a String, separating the generation,
and the file-writing. Performance isn't critical here, and this let me debug
and test the actual code generation, without dealing with File IO.
* I fixed a random bug in TestReflect, where the equals() method was wrong, and
fixed a bug in TestValidatingIO, where I asserted that it is nonsense to have a
fixed field of 0 bytes.
> Adding "doc" to record schemas, a la javadoc field and class comments.
> ----------------------------------------------------------------------
>
> Key: AVRO-152
> URL: https://issues.apache.org/jira/browse/AVRO-152
> Project: Avro
> Issue Type: New Feature
> Reporter: Philip Zeyliger
> Assignee: Philip Zeyliger
> Attachments: AVRO-149.patch.txt
>
>
> The patch to follow adds "doc" to the understood schema language (for records
> and enums), and uses said doc when it generates java in SpecificCompiler.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.