Closed mankdev closed 5 years ago
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.
io-ts
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.
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