Liking cljdoc? Tell your friends :D
Clojure only.

clj-oci.request

Builds OCI Java SDK request objects from nested Clojure maps.

oci-build is the public entry point. It accepts a target Java class, the corresponding schema from oci-doc, a Clojure params map, and an enum registry from enum-registry. It is intended to be called from clj-oci.oci/oci-request.

Error reporting uses breadcrumb paths so failures are easy to locate:

(oci-build RequestSummarizedUsagesRequest request-schema {:requestSummarizedUsagesDetails {:granularity :typo ...}} enum-reg) ;; => throws ex-info with: ;; {:path [:requestSummarizedUsagesDetails :granularity] ;; :expected {:type ...Granularity :enum-values [Hourly Daily ...]} ;; :got :typo}

Builds OCI Java SDK request objects from nested Clojure maps.

`oci-build` is the public entry point. It accepts a target Java class,
the corresponding schema from `oci-doc`, a Clojure params map, and an
enum registry from `enum-registry`. It is intended to be called from
`clj-oci.oci/oci-request`.

Error reporting uses breadcrumb paths so failures are easy to locate:

  (oci-build RequestSummarizedUsagesRequest
             request-schema
             {:requestSummarizedUsagesDetails
              {:granularity :typo ...}}
             enum-reg)
  ;; => throws ex-info with:
  ;;    {:path     [:requestSummarizedUsagesDetails :granularity]
  ;;     :expected {:type ...Granularity :enum-values [Hourly Daily ...]}
  ;;     :got      :typo}
raw docstring

oci-buildclj

(oci-build clazz schema params enum-reg)
(oci-build clazz schema params enum-reg path)

Builds a Java OCI SDK object of type clazz from a nested Clojure map.

Arguments: clazz — target Java class (must have a $Builder inner class). schema — the oci-doc schema for clazz (a sorted-map of field schemas). params — Clojure map whose keys are field keywords matching schema. enum-reg — enum registry from (clj-oci.oci/enum-registry doc). path — breadcrumb accumulated during recursion; omit at top level.

Validates all keys in params against schema before constructing anything. Throws ex-info with {:path ... :expected ... :got ...} on first mismatch.

Builds a Java OCI SDK object of type `clazz` from a nested Clojure map.

Arguments:
  `clazz`    — target Java class (must have a $Builder inner class).
  `schema`   — the `oci-doc` schema for `clazz` (a sorted-map of field schemas).
  `params`   — Clojure map whose keys are field keywords matching `schema`.
  `enum-reg` — enum registry from `(clj-oci.oci/enum-registry doc)`.
  `path`     — breadcrumb accumulated during recursion; omit at top level.

Validates all keys in `params` against `schema` before constructing anything.
Throws `ex-info` with `{:path ... :expected ... :got ...}` on first mismatch.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close