avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ambarish Pande (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AVRO-2110) Incorrect example of enum type in documentation.
Date Tue, 05 Dec 2017 10:19:00 GMT
Ambarish Pande created AVRO-2110:
------------------------------------

             Summary: 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


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



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message