s/letfn
bindingss/fn
perf caveats in Clojure by avoiding wrapperss/defprotocol
2021-11-03
)cljc
instead of cljx
, which requires Clojure 1.7 or later. (#425)2019-08-10
)2019-06-12
)aget
, aset
, and uuid
.::schema.spec.collection/
keywords to fix compatibility with latest Clojure 1.9 alpha.->MapEntry
warnings with latest cljs.isa?
and the global hierarchyfn-validator
functionclojure.core/Inst
to avoid warnings in Clojure 1.9 alphasone-element
or all-elements
).s/optional
element.pretty
.use-fn-validation
var to callsites.atom
under Clojure 1.7constrained
with some schemas (e.g. maps).enum
coercion to keyword eq
coercions/atom
schema for atomscoercer!
which throws on errors/defn
compatible with with-test
constrained
schema for postconditions (replaces (both x (s/pred ...))
)s/either
in favor of s/cond-pre
, s/conditional
, or schema.experimental.abstract-map-schema
. As of this release, either
no longer works with coercion.s/both
in favor of improved s/conditional
.schema.core/defrecord+
; moved to new schema.potemkin
namespace.s/pred
can more intelligently guess the predicate namerecord
schemas can now coerce values to corresponding record types.abstract-map-schema
that models super/subclasses as maps.map->Record
constructors being redefined.s/defn
or s/defrecord
.deftype
).^{:schema ..}
style annotations. :- schema
is the preferred way, but metadata-style schemas are still allowed for valid Clojure typehints.:- Protocol
annotations (use :- (s/protocol Protocol)
instead).defn
, defrecord
, etc) from schema.macros. The identical versions in schema.core remain.*use-potemkin*
flag. To get the old behavior of potemkin defrecords, you can still bring your own potemkin and use schema.core/defrecord+
in place of schema.core/defrecord
.defschema
which clobbered metadata, breaking s/protocol
in Clojure in 0.3.2.s/protocol
in Clojure (didn't work properly with extends created later)set-compile-fn-validation!
function to turn off emission of validation globally, and turn off emission of validation code for non- ^:always-validate functions when assert is false.clojure.data/diff
and class
inside error messages.schema.macros
in client code -- prefer canonical versions in schema.core
in both Clojure and ClojureScript, using :include-macros true
in cljs.^{:s schema}
syntax for providing schemas.*use-potemkin*
flag and behavior to default to potemkin s/defrecords in Clojure;
in future releases, you will have to provide your own potemkin and explicitly opt-in to this behavior.isa
schema for Clojure hierarchies.normalized-defn-args
helper fn for defining s/defn
-like macros.s/recursive
to work on artibrary refss/Symbol
as a cross-platfor primitives/def
.s/defmethod
.Bool
coercions.Bool
to cross-platform primitivescheck
with walker
, for increased speed and versatilitylongs
, etc)letfn
s/defn
:never-validate
meta options/defn
(thanks danielneal)set-fn-validation!
to schema.core, to globally turn validation on or off.:always-validate
metadata on fn/defn name to unconditionally use validation.defschema
puts name in metadata, rather than generating named schemas/defn
Can you improve this documentation? These fine people already did:
Jason Wolfe, Gary Fredericks, Ambrose Bonnaire-Sergeant, loganlinn, Jason Whitlark, Daniel Neal, Kimmo Koskinen, vpagliari & Phillip MatesEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close