glideapps / glideapps/quicktype
Enum schemas aren't generated if the enumerator list matches
Open
bug
input:JSON Schema
naming
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.