You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Ambarish Pande (JIRA)" <ji...@apache.org> on 2017/12/05 10:19:00 UTC
[jira] [Updated] (AVRO-2110) Incorrect example of enum type in
documentation.
[ https://issues.apache.org/jira/browse/AVRO-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ambarish Pande updated AVRO-2110:
---------------------------------
Description:
The documentation mentions this example:
{code:java}
{
"type": "enum",
"name": "Suit",
"symbols" : ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
}
{code}
But using this in schema throws error:
"enum" is not a defined name. The type of the "Suit" field must be a defined name or a {"type": ...} expression.
Correct Example should be:
{code:java}
{
"name": "Suit",
"type": {
"name": "Suit",
"type": "enum",
"symbols" : ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
}
}
{code}
https://avro.apache.org/docs/1.8.1/spec.html#Enums
was:
The documentation mentions this example:
{code:json}
{
"type": "enum",
"name": "Suit",
"symbols" : ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
}
{code}
But using this in schema throws error:
"enum" is not a defined name. The type of the "Suit" field must be a defined name or a {"type": ...} expression.
Correct Example should be:
{code:json}
{
"name": "Suit",
"type": {
"name": "Suit",
"type": "enum",
"symbols" : ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
}
}
{code}
https://avro.apache.org/docs/1.8.1/spec.html#Enums
> Incorrect example of enum type in documentation.
> ------------------------------------------------
>
> Key: AVRO-2110
> URL: https://issues.apache.org/jira/browse/AVRO-2110
> Project: Avro
> Issue Type: Bug
> Affects Versions: 1.8.1
> Reporter: Ambarish Pande
> Priority: Minor
> Labels: documentation
>
> The documentation mentions this example:
> {code:java}
> {
> "type": "enum",
> "name": "Suit",
> "symbols" : ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
> }
> {code}
> But using this in schema throws error:
> "enum" is not a defined name. The type of the "Suit" field must be a defined name or a {"type": ...} expression.
> Correct Example should be:
> {code:java}
> {
> "name": "Suit",
> "type": {
> "name": "Suit",
> "type": "enum",
> "symbols" : ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
> }
> }
> {code}
> https://avro.apache.org/docs/1.8.1/spec.html#Enums
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)