[
https://issues.apache.org/jira/browse/AVRO-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17103273#comment-17103273
]
Martin Jubelgas commented on AVRO-1329:
---------------------------------------
Since I do have use for this functionality, I'd offer to implement this one.
However, I'd like to suggest an alternative approach to the extension.
While the json schema will not be as pretty as one would like to see it, I
would suggest something like:
{code:json}
{
"name": "Foo",
"type":"enum",
"doc":"an enum",
"symbols": ["X","Y"],
"symbolsDef": [
{
"value" : "X",
"doc": "X is X",
"aliases" : [ "x", "a" ]
},
{
"value": "Y",
"doc" "Y is Y"
}
]
}
{code}
So, the symbolsDef section would contain the actual new, extendable definition
of enum symbols, while the "symbols" array would hold a list of symbol names
only for backward compatibility.
If no symbolsDef section is present, default definitions for the specified
symbols would be used.
That way, AVRO-1752 could be addressed easily later on, and other extensions
might be possible, too.
Just want feedback before I start something as "intrusive" to the schema.
> 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.
> Doung 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)