Liking cljdoc? Tell your friends :D

com.yetanalytics.datasim.json.schema


array-schema->specclj

(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
sourceraw docstring

item-spec-vec->or-speccljmacro

(item-spec-vec->or-spec array-items)

create item-pred for single-item->spec

create `item-pred` for `single-item->spec`
sourceraw docstring

item-spec-vec->or-spec*cljmacro

(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`
sourceraw docstring

items-coll->speccljmacro

(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`
sourceraw docstring

items-kind->speccljmacro

(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
sourceraw docstring

many-items->speccljmacro

(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`
sourceraw docstring

mk-kw-seqclj

(mk-kw-seq n)

kw seq of n length

kw seq of n length
sourceraw docstring

number-boundaries->specclj

(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
sourceraw docstring

number-schema->specclj

(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
sourceraw docstring

object-schema->specclj

(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
sourceraw docstring

property-schema->spec-fnclj

(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
sourceraw docstring

schema->specclj

(schema->spec rng schema)
(schema->spec rng complex-kind complex-schema)
source

single-item->specclj

(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`
sourceraw docstring

string-schema->specclj

(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
sourceraw docstring

valid-items->speccljmacro

(valid-items->spec items ?max-items ?min-items ?unique-items rng)

branch based on type implications

branch based on type implications
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close