Skip to content

Support enums with single value #33

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

Closed
mankdev opened this issue Jul 26, 2019 · 0 comments · Fixed by #34
Closed

Support enums with single value #33

mankdev opened this issue Jul 26, 2019 · 0 comments · Fixed by #34
Labels
bug Something isn't working

Comments

@mankdev
Copy link
Contributor

mankdev commented Jul 26, 2019

Now enum with single value leads to error during typescript compilation, because enum generates as io-ts union type, witch should have at least two elements.

According spec it it valid case https://tools.ietf.org/id/draft-fge-json-schema-validation-00.html#rfc.section.5.5.1

The value of this keyword MUST be an array. This array MUST have at least one element. Elements in the array MUST be unique.

@mankdev mankdev added bug Something isn't working invalid This doesn't seem right labels Jul 26, 2019
@mankdev mankdev changed the title Support single values for enums Support enums with single value Jul 26, 2019
@mankdev mankdev removed the invalid This doesn't seem right label Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant