metosin/malli

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

Open

#881 创建于 2023年3月23日

在 GitHub 查看
 (5 评论) (1 反应) (0 负责人)Clojure (1,724 star) (237 fork)batch import
enhancementhelp wanted

描述

[: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
}

贡献者指南