metosin/malli

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

開放

#881 建立於 2023年3月23日

 (5 則留言) (1 個反應) (0 位負責人)Clojure (237 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (1,724 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南