Fork me on GitHub
#malli
<
2022-12-18
>
respatialized15:12:03

basic question: is there a mechanism for annotating/adding descriptions to basic schema types in a manner similar to annotating map keys? Example use case: annotating tuple elements. I'd like to attach more information than just :string alone. E.g. instead of:

[:tuple :uuid :string :string]
something like:
[:tuple {:type :uuid :description "The unique identifier for thing."} {:type :string :description "The thing's annotation."} {:type :string :description "The thing's title."}]
is there an obvious way to do this that I've just totally overlooked?

ikitommi16:12:06

Any schema can have properties, so: `[:tuple [:uuid {:description "..."}] [:string {...}] [:string {...}]]`

respatialized16:12:53

yeah I remembered the [:string {:description "..."}] syntax not long after I posted this, thanks! duckie

👍 1