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

Handle defaults via conforming #51

Open
ikitommi opened this issue May 8, 2017 · 0 comments
Open

Handle defaults via conforming #51

ikitommi opened this issue May 8, 2017 · 0 comments

Comments

@ikitommi
Copy link
Member

ikitommi commented May 8, 2017

(s/def ::int
  (st/spec
    {:spec integer?
     :default 42}))

(st/conform ::int nil nil)
; ::s/invalid

(st/conform ::int nil st/default-conforming)
; 42

should contribute to JSON Schema too.

@ikitommi ikitommi changed the title Handle defaults via coercion Handle defaults via conforming May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant