flipstone / json-fleece

Extensible JSON Schemas for Haskell
MIT License
2 stars 1 forks source link

[sc-36080] Better error on non-string enum #30

Closed ysangkok closed 5 months ago

ysangkok commented 5 months ago

When YAML specs contain e.g.

enum:
- DK
- FI
- NO
- SE
type: string

the NO will be interpreted as a boolean. To make it easier to identify the spot in the schema, such that it can be quoted, this PR adds the schema/param name in the error message.

The same issue can occur with the other boolean aliases too.