(array-schema->spec rng array-schema)
Partial/Minimal coverage of specs corresponding to JSON Schema Array Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.4 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.3.1
Partial/Minimal coverage of specs corresponding to JSON Schema Array Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.4 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.3.1
(item-spec-vec->or-spec array-items)
create item-pred
for single-item->spec
create `item-pred` for `single-item->spec`
(item-spec-vec->or-spec* array-items)
prep for creation of s/or
used as item-pred
in single-item->spec
prep for creation of `s/or` used as `item-pred` in `single-item->spec`
(items-coll->spec array-items-coll ?max-items ?min-items ?uni-items rng)
tuple spec based off of ordering in supplied array-items-coll
tuple spec based off of ordering in supplied `array-items-coll`
(items-kind->spec array-items ?max-items ?min-items ?uni-items rng)
spec which covers all items in the parent array
spec which covers all items in the parent array
(many-items->spec array-items ?max-items ?min-items ?uni-items)
s/and
of
a) s/tuple
made from specs within array-items
b) s/coll-of
(s/or
made from specs within array-items
) + ?max-items
+ ?min-items
+ ?uni-items
`s/and` of a) `s/tuple` made from specs within `array-items` b) `s/coll-of` (`s/or` made from specs within `array-items`) + `?max-items` + `?min-items` + `?uni-items`
(number-boundaries->spec kind ?min ?exclusiveMin ?max ?exclusiveMax)
return s/int-in
or s/or
s/int-in
s/double-in
based on kind
-> respects ?exclusiveMin
and ?exclusiveMax
for ints
-> respects 3 points of percision for double ?exclusiveMin
and ?exclusiveMax
-> respects inclusive ?min
and ?max
for both ints and doubles
return `s/int-in` or `s/or` `s/int-in` `s/double-in` based on `kind` -> respects `?exclusiveMin` and `?exclusiveMax` for ints -> respects 3 points of percision for double `?exclusiveMin` and `?exclusiveMax` -> respects inclusive `?min` and `?max` for both ints and doubles
(number-schema->spec _ number-schema)
Creates specs corresponding to JSON Schema Number Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.2 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1
Creates specs corresponding to JSON Schema Number Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.2 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1
(object-schema->spec rng object-schema)
Partial/Minimal coverage of specs corresponding to JSON Schema Object Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.5 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.3.2
Partial/Minimal coverage of specs corresponding to JSON Schema Object Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.5 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.3.2
(property-schema->spec-fn properties rng)
return a fn which validates a JSON object against the constraints defined in properties
.
-> resolves the specs for each kv pair in properties
-> query to-validate
for each k in properties
-> validate query result against spec for the k
return a fn which validates a JSON object against the constraints defined in `properties`. -> resolves the specs for each kv pair in `properties` -> query `to-validate` for each k in `properties` -> validate query result against spec for the k
(single-item->spec item-pred ?max-items ?min-items ?uni-items)
(single-item->spec item ?max-items ?min-items ?uni-items rng)
create s/coll-of
which respects :min-count
, :max-count
and :distinct
via ?max-items
, ?min-items
and ?uni-items
respectively.
Multiarity to support different sources for pred passed to s/coll-of
-> pred = (schema->spec
rng
item
) | item-pred
create `s/coll-of` which respects `:min-count`, `:max-count` and `:distinct` via `?max-items`, `?min-items` and `?uni-items` respectively. Multiarity to support different sources for pred passed to `s/coll-of` -> pred = (`schema->spec` `rng` `item`) | `item-pred`
(string-schema->spec _ string-schema)
Creates specs corresponding to JSON Schema String Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.3 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1
Creates specs corresponding to JSON Schema String Instance Validation constraints -> see: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.3 -> see: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1
(valid-items->spec items ?max-items ?min-items ?unique-items rng)
branch based on type implications
branch based on type implications
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close