Liking cljdoc? Tell your friends :D

s-exp.pact


assoc-metaclj

(assoc-meta spec k x)

Assoc k->x on metadata for spec

Assoc `k`->`x` on metadata for `spec` 
raw docstring

default-optsclj


find-descriptionclj

Find first description value in spec hierarchy for spec

Find first `description` value in spec hierarchy for spec
raw docstring

find-formatclj

Find first format value in spec hierarchy for spec

Find first `format` value in spec hierarchy for spec
raw docstring

find-idclj

Find first $id value in spec hierarchy for spec

Find first `$id` value in spec hierarchy for spec
raw docstring

find-patternclj

Find first pattern value in spec hierarchy for spec

Find first `pattern` value in spec hierarchy for spec
raw docstring

find-schemaclj

Find first schema value in spec hierarchy for spec

Find first `schema` value in spec hierarchy for spec
raw docstring

find-titleclj

Find first title value in spec hierarchy for spec

Find first `title` value in spec hierarchy for spec
raw docstring

json-schemaclj

(json-schema k
             &
             {:as opts
              :keys [property-key-fn strict gen-only-first-and-arg
                     unknown-spec-default]})

Generate json-schema for spec. opts support:

  • property-key-fn - function that will convert the spec keys to json-schema keys - defaults to name

  • strict - whether to throw or not upon encountering unknown values for conversion - defaults to true

  • gen-only-first-and-arg - whether to only attempt generate the first predicate of s/and - defaults to false

  • unknown-spec-default - value to be used for unknown values for conversion

  • defaults to nil
Generate json-schema for `spec`.
`opts` support:

* `property-key-fn` - function that will convert the spec keys to json-schema
keys - defaults to `name`

* `strict` - whether to throw or not upon encountering unknown values for
conversion - defaults to `true`

* `gen-only-first-and-arg` - whether to only attempt generate the first
predicate of `s/and` - defaults to `false`

* `unknown-spec-default` - value to be used for unknown values for conversion
- defaults to `nil`
raw docstring

metaclj

(meta spec)

Returns spec metadata

Returns `spec` metadata
raw docstring

register-form!clj

(register-form! form f)

Registers a form for generation. Upon encountering that form (by matching its against first element or sequential symbolic spec values), json-schema will then call f against its arguments for generation. Returns form passed as argument

Registers a `form` for generation. Upon encountering that form (by matching its
against first element or sequential symbolic spec values), `json-schema` will
then call `f` against its arguments for generation. Returns form passed as argument
raw docstring

register-ident!clj

(register-ident! ident x)

Registers an ident for generation. Upon encountering a qualified symbol/keyword matching an ident in the registry it will return x as generated value. Returns the ident passed as argument

Registers an `ident` for generation. Upon encountering a qualified
symbol/keyword matching an `ident` in the registry it will return `x` as
generated value. Returns the `ident` passed as argument
raw docstring

register-pred!clj

(register-pred! k schema-fn)
(register-pred! k schema-fn _opts)

Sets conformer and schema-fn for predicate parser. If a conformer matches, the bindings we get from the s/conform result will be passed to schema-fn in order to generate an appropriate json-schema value for the predicate.

Sets `conformer` and `schema-fn` for predicate parser.
If a conformer matches, the bindings we get from the s/conform result will be
passed to `schema-fn` in order to generate an appropriate json-schema value
for the predicate.
raw docstring

registryclj

(registry)
(registry k)

Returns registry

Returns registry
raw docstring

registry-refclj


vary-metaclj

(vary-meta k f & args)

Like clojure.core/vary-meta but on speck` metadata

Like `clojure.core/vary-meta but on spec `k` metadata
raw docstring

with-descriptionclj

(with-description k description)

Add description to spec

Add `description` to spec
raw docstring

with-formatclj

(with-format k fmt)
Add `format` to spec.
See https://json-schema.org/understanding-json-schema/reference/string#built-in-formats
raw docstring

with-idclj

(with-id spec id)

Adds $id to spec

Adds $id to spec
raw docstring

with-metaclj

(with-meta spec x)

Sets metadata for spec

Sets metadata for `spec` 
raw docstring

with-patternclj

(with-pattern k p)

Add pattern to spec

Add `pattern` to spec
raw docstring

with-titleclj

(with-title k title)

Add title to spec

Add `title` to spec
raw docstring

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

× close