Issue Type
Quicktype output
Context (Environment, Version, Language)
Input Format: JSON Schema
Output Language: Haskell
CLI, npm, or app.quicktype.io: CLI and app.quicktype.io
Version:
Description
Error is marked as a forbidden global identifier, so enums named error are renamed to avoid clashing, but this is unnecessary for enums, which are already suffixed.
cc @algas
Input Data
{
"id": "http://json-schema.org/geo",
"$schema": "http://json-schema.org/draft-06/schema#",
"description": "A geographical coordinate",
"type": "string",
"enum": ["ok", "error"]
}
Expected Behaviour / Output
data Health
= ErrorHealth
| OkHealth
deriving (Show)
Current Behaviour / Output
data Health
= HealthErrorHealth
| OkHealth
deriving (Show)
Steps to Reproduce
Possible Solution
- Aeson imports should be excluded from the forbidden list; the generator should import
Data.Aeson qualified
- Forbidden identifiers should be renamed only when it exactly matches. If a suffix is being added, it should not be renamed
Issue Type
Quicktype output
Context (Environment, Version, Language)
Input Format: JSON Schema
Output Language: Haskell
CLI, npm, or app.quicktype.io: CLI and app.quicktype.io
Version:
Description
Erroris marked as a forbidden global identifier, so enums namederrorare renamed to avoid clashing, but this is unnecessary for enums, which are already suffixed.cc @algas
Input Data
{ "id": "http://json-schema.org/geo", "$schema": "http://json-schema.org/draft-06/schema#", "description": "A geographical coordinate", "type": "string", "enum": ["ok", "error"] }Expected Behaviour / Output
Current Behaviour / Output
Steps to Reproduce
Possible Solution
Data.Aesonqualified