[
https://issues.apache.org/jira/browse/AVRO-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766743#action_12766743
]
Philip Zeyliger commented on AVRO-154:
--------------------------------------
bq. Should we add an option to pretty-print the schema?
Yes, but not quite yet? I want to figure out how to do command-line parsing
for tools, but I want to do some more research and have a couple more examples
before I get there.
bq. Should we add an option/command to induce protocols from an interface too?
Probably, but I'm not yet sure how to do it. getProtocol() requires paranamer,
so whereas it makes sense to point "induce" at a POJO, I'm not sure if it makes
sense to point it at an arbitrary class --- chances are, it won't have the
paranamer data. We could run paranamer from within the tool, but that's
sufficiently different that I'd rather leave it for a different JIRA.
> Tool to induce schema using reflection
> --------------------------------------
>
> Key: AVRO-154
> URL: https://issues.apache.org/jira/browse/AVRO-154
> Project: Avro
> Issue Type: New Feature
> Reporter: Philip Zeyliger
> Assignee: Philip Zeyliger
> Attachments: AVRO-154.patch.txt
>
>
> Patch that follows gives command-line access to ReflectData's getSchema()
> API, which creates an AVRO schema based on reflection.
> Here's an example:
> {noformat}
> $ src/scripts/avroj.sh induce build/test/classes org.apache.avro.BarRecord
>
> {"type":"record","name":"BarRecord","namespace":"org.apache.avro","fields":[{"name":"beerMsg","type":"string"}]}
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.