Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error on non-string enum #31

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Better error on non-string enum #31

merged 1 commit into from
Apr 9, 2024

Conversation

ysangkok
Copy link
Contributor

@ysangkok ysangkok commented Apr 9, 2024

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.

@ysangkok ysangkok merged commit 332df5b into main Apr 9, 2024
1 check passed
@ysangkok ysangkok deleted the non-string-enum-err branch April 9, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants