Fork me on GitHub
#malli
<
2022-07-13
>
George Peristerakis14:07:18

I have a registry with large data objects specs. I created a list of base specs to have a more consistent taxonomy ex: :pk-int [int? {:min 1 :unique true}] . What is the best way to represent these base specs? Should I have a separate registry or keep them in the same registry?

DrLjótsson16:07:07

Newbie question: How do I specify that a value should be of a specific class, for example java.time.ZonedDateTime

respatialized16:07:29

[:fn #(instance? % java.time.ZonedDateTime)]

respatialized16:07:23

Not sure if there's another "official" way but I've done it that way in the past

DrLjótsson16:07:07

Thanks! I thought there might be a more official way but this will do just fine.

Tiago Dall'Oca19:07:40

Hey, more of a implementation question: why schemas instances are implemented with reify instead of using records? When I tried extending IPrintWithWriter to malli.core.Schema it didn't work because the type generated for schemas with reify isn't malli.core.Schemas