metosin/malli

Allow more than one pair of `key-schema` `value-schema` for `:map-of`

Open

#881 opened on Mar 23, 2023

 (5 comments) (1 reaction) (0 assignees)Clojure (237 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (1,724 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

[:map-of {}
  :keyword :int
  [:re #"^([a-z][a-z0-9]*)+(-[a-z0-9]+)*\\-ext$"] [:map ,,,]]

Something similar exists in json-schema:

{
  "type": "object",
  "patternProperties": {
    "^([a-z][a-z0-9]*)+(-[a-z0-9]+)*\\-ext$": {},
    "^([a-z][a-z0-9]*)+(-[a-z0-9]+)*\\-ext-definition$": {}
  },
  "additionalProperties": false
}

Contributor guide