quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

Enum schemas aren't generated if the enumerator list matches

Open beku-epitome opened this issue 1 year ago • 0 comments

I have two JSON schema files, where the type names are different, but the enumerators are matching.

{ "title":"firstEnumeration","enum": ["a","b","c"],"type": "string"}
{ "title":"secondEnumeration","enum": ["a","b","c"],"type": "string"}

When I use quicktype to generate source code, I only get output for the secondEnumeration, even though they are two different types - there is also no alias type generated for firstEnumeration, it is simply an unknown symbol. This problem is observed across multiple output languages, so the logic to blame must be in the JSON schema parsing logic.

beku-epitome avatar Jan 29 '24 14:01 beku-epitome