Liking cljdoc? Tell your friends :D

nl.jomco.openapi.v3.json-pointer

Parse and resolve JSON Pointers

Parse and resolve JSON Pointers
raw docstring

as-keyclj

(as-key x)

Coerce x to key (string or integer).

Coerce `x` to key (string or integer).
raw docstring

as-pathclj

(as-path x)

Coerce x to a path. If x is a string, parse as JSON pointer.

Coerce `x` to a path. If `x` is a string, parse as JSON pointer.
raw docstring

canonical-pathclj

(canonical-path document path)
(canonical-path document path throw-on-nil?)

Get the canonical version of path in document.

Given a document that may contain $ref pointers, and a path, return the equivalent path that contains no pointers. Throws an exception when cyclic references are encountered.

Returns nil when path does not point to a node in the document. If throw-on-nil? is provided and true, raise an error instead.

See also find and get.

Get the canonical version of `path` in `document`.

Given a document that may contain $ref pointers, and a path, return
the equivalent path that contains no pointers. Throws an exception
when cyclic references are encountered.

Returns nil when path does not point to a node in the document. If
`throw-on-nil?` is provided and true, raise an error instead.

See also `find` and `get`.
raw docstring

findclj

(find document path)
(find document path throw-on-nil?)

Find node and canonical path in document.

Given a document that may contain $ref pointers, and a path, return a tuple (vector) of the canonical path and the node at that path. Throws an exception when cyclic references are encountered.

If path is a string, it will be parsed as a JSON pointer. The returned path is always a vector.

Returns nil when path does not point to a node in the document. If throw-on-nil? is provided and true, raise an error instead.

See also canonical-path and pointer-path.

Find node and canonical path in `document`.

Given a document that may contain $ref pointers, and a path, return
a tuple (vector) of the canonical path and the node at that
path. Throws an exception when cyclic references are encountered.

If `path` is a string, it will be parsed as a JSON pointer. The
returned path is always a vector.

Returns nil when path does not point to a node in the document. If
`throw-on-nil?` is provided and true, raise an error instead.

See also `canonical-path` and `pointer-path`.
raw docstring

getclj

(get document path)
(get document path throw-on-nil?)

Get node at path in `document.

Given a document that may contain $ref pointers, and a path, return the equivalent path that contains no pointers. Throws an exception when cyclic references are encountered.

Returns nil when path does not point to a node in the document. If throw-on-nil? is provided and true, raise an error instead.

See also find and get.

Get node at `path` in `document.

Given a document that may contain $ref pointers, and a path, return
the equivalent path that contains no pointers. Throws an exception
when cyclic references are encountered.

Returns nil when path does not point to a node in the document. If
`throw-on-nil?` is provided and true, raise an error instead.

See also `find` and `get`.
raw docstring

pointer-pathclj

(pointer-path pointer)

Parse a JSON Pointer as a path vector.

The returned path's keys are integers or strings.

Parse a JSON Pointer as a path vector.

The returned path's keys are integers or strings.
raw docstring

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

× close