@hoppy https://github.com/metosin/malli/issues/87 help welcome!
is it correct that (at least currently), transforming enums from json does not yet correctly transform them to keywords if necessary ?
@lmergen Should enums always be keywords?
well I wouldn’t say always — but at least I would expect it to convert it if that leads to a valid enum value
right
@lmergen right. There is no type inferrer with enums. They could be anything [:enum 1 "2" :3 '4]
. If you know the type, you can hint it: [:and keyword? [:enum :a :b :c]]
and they transform correctly
oh that works well enough for now
the generated JSON Schema with :and
is bit off, it creates :allOf
out of that. Should merge the results instead if there is just one district :type
found.
(correct, but not practical)