metosin/malli

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

オープン

#881 opened on 2023/03/23

 (5 件のコメント) (1 件のリアクション) (0 人の担当者)Clojure (237 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (1,724 個のスター)
PR merge metrics
 (30d に merged 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
}

コントリビューターガイド