Fork me on GitHub
#malli
<
2023-10-26
>
danielneal09:10:20

How do you add properties to the key of a map-of schema? I’d like to specify that it’s a map of a path to a map-of an http-method to a value. Not sure where to put the props

[:map-of {:title "path"} ;;; <- where does this go
  string? 
  [:map-of [:enum {:title "method"} :get :post :patch :put :delete]] :map]

steveb8n10:10:14

Have you tried [:schema :string] for the key?

ikitommi14:10:50

or [:string {:path "name"}].

danielneal14:10:17

I’ll try, think the problem might actually be the tool I’m using (redoc) to display the open api spec. [:string {:path "name"}] is good to know. Thanks 🙂