[
https://issues.apache.org/jira/browse/AVRO-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17103842#comment-17103842
]
Felix GV commented on AVRO-1329:
--------------------------------
Wow, what a throwback. I didn’t remember submitting this nearly 7 years ago 😄
Regarding the latest spec proposal, it seems mildly awkward to me to have the
spec be a parallel array of objects that contain the symbol name. A parallel
array shouldn’t need to contain the symbol since its index is itself the symbol
reference.
Alternatively, if having the symbol next to the doc is considered better for
readability, then why not use a map (i.e. JSON object) instead, where the key
is the symbol name and the value is a doc string, or another object containing
a doc string field? This would mean the schema parser can be tolerant of out of
order doc or sparse doc, since the map provides a strong guarantee that each
symbol will be present only once.
-F
> Get per-symbol doc for enums
> ----------------------------
>
> Key: AVRO-1329
> URL: https://issues.apache.org/jira/browse/AVRO-1329
> Project: Apache Avro
> Issue Type: Improvement
> Components: doc
> Affects Versions: 1.7.4
> Reporter: Felix GV
> Priority: Minor
>
> It would be nice to have the ability to add documentation for each symbol of
> an enum.
> Doug Cutting, quoted from the mailing list:
> Documentation per enum symbol is not currently supported, but would not be
> difficult to add. Please file an issue in Jira if you'd like to see this. For
> compatibility, in Json, this would probably appear as a parallel array of
> documentation strings, e.g., something like:
> ("name": "Foo", "type":"enum", "doc":"an enum", "symbols":["X","Y"],
> "symbols-doc":["X is X", "Y is Y"]}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)