Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow swapping the default registry without tears #583

Merged
merged 4 commits into from Nov 27, 2021

Conversation

ikitommi
Copy link
Member

(require '[malli.core :as m]
         '[malli.util :as mu]
         '[malli.registry :as mr]
         '[malli.generator :as mg])

;; look ma, just works
(mr/set-default-registry!
  (mr/composite-registry
    (m/default-schemas)
    (mu/schemas)))

(mg/generate
  [:merge
   [:map [:x :int]]
   [:map [:y :int]]])
; => {:x 0, :y 92}

@ikitommi
Copy link
Member Author

related discussion: #565

README.md Outdated Show resolved Hide resolved
@ikitommi ikitommi force-pushed the easy-way-to-swap-default-registry branch from 7b85929 to c43c15f Compare November 27, 2021 15:59
@ikitommi ikitommi merged commit bbd4589 into master Nov 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants