malli

yuhan 2025-06-01T00:24:44.802579Z

Is there any way to get malli.provider to infer :enum schemas? something like

(mp/provide [{:user/status "admin"}
             {:user/status "member"}]
  ???)
=> [:map [:user/status [:enum "admin" "member"]]]
instead of [:map [:user/status :string]]

2025-06-02T17:45:59.149689Z

looks like you need to wrap the strings in a hint https://github.com/metosin/malli/blob/bf7d50bbef8feae11944bf8b094bfd600ed164e4/test/malli/provider_test.cljc#L127-L130

➕ 1
2025-06-02T17:47:09.171079Z

(mp/provide [{:user/status (mp/-hinted "admin" :enum)}
             {:user/status "member"}]