We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, to add a new dynamic conforming, one needs to do the following things:
:color
Spec
Instead, we should allow inlined type definitions, something like:
(require '[spec-tools.core :as st]) (st/spec {:name "Color" :spec color? :conforming/json string->color :conforming/string string->color :json-schema/type "string" :json-schema/default "white"})
The text was updated successfully, but these errors were encountered:
This works now in 0.6.2-SNAPSHOT:
0.6.2-SNAPSHOT
(require '[spec-tools.core :as st]) (require '[spec-tools.conform :as conform]) (def spec (st/spec {:spec string? :description "a string spec" ::conform/json #(str %2 "-json") ::conform/string #(str %2 "-string")})) (st/conform spec "kikka") ; "kikka" (st/conform spec "kikka" st/json-conforming) ; "kikka-json" (st/conform spec "kikka" st/string-conforming) ; "kikka-string"
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Currently, to add a new dynamic conforming, one needs to do the following things:
:color
Spec
with the given predicate & typeInstead, we should allow inlined type definitions, something like:
The text was updated successfully, but these errors were encountered: