apiaryio / drafter

API Blueprint Parser (C++)
https://apiblueprint.org/
MIT License
301 stars 54 forks source link

Enumerations contain duplicate values when you have a default/sample with different description #718

Closed kylef closed 5 years ago

kylef commented 5 years ago

Given the following example, the "enumerations" inside the "enum" element contain east twice in the parse result, if you remove the description then they are correctly deduplicated.

# API
## GET /

+ Response 200 (application/json)
    + Attributes
        + direction (enum)
            + `east` - a description
            + Default
                + `east`
kylef commented 5 years ago

I think similiar applies when you use direction: east to set the content value to use in the enum element, it will be duplicated in the enumerations as it won't have the description.