Liking cljdoc? Tell your friends :D

blueprint.spec-gen

A generator of clojure specs for data-based API definitions.

This differs from spec-gen.clj by creating registered specs. So they are reachable by just using keywords with vanilla the spec api.

  • resource specs are in the form of exoscale.test-api.resource/job with for instance one of it's fields:

exoscale.test-api.resource.job/id where exoscale.test-api is the blueprint definition root namespace, job the resource and id one of its fields.

  • commands specs for :update-job-posting are are under:

    • exoscale.test-api.command.update-job-posting/output
    • exoscale.test-api.command.update-job-posting/input
    • exoscale.test-api.command.update-job-posting/params
    • exoscale.test-api.command.update-job-posting/path
    • exoscale.test-api.command.update-job-posting/handler
  • resources

    • exoscale.test-api.resource/job
    • exoscale.test-api.resource/user
A generator of clojure specs for data-based API definitions.

This differs from spec-gen.clj by creating registered specs. So they
are reachable by just using keywords with vanilla the spec api.

* resource specs are in the form of `exoscale.test-api.resource/job`
with for instance one of it's fields:

`exoscale.test-api.resource.job/id` where `exoscale.test-api` is the
blueprint definition root namespace, `job` the resource and `id` one
of its fields.

* commands specs for :update-job-posting are are under:
  - `exoscale.test-api.command.update-job-posting/output`
  - `exoscale.test-api.command.update-job-posting/input`
  - `exoscale.test-api.command.update-job-posting/params`
  - `exoscale.test-api.command.update-job-posting/path`
  - `exoscale.test-api.command.update-job-posting/handler`

* resources
  - `exoscale.test-api.resource/job`
  - `exoscale.test-api.resource/user`
raw docstring

-compile-speccljmultimethod


command->keyclj

(command->key k)

Takes a whole keyword and generate a part good for name usage, including the ns potentially. :foo.bar/baz -> "foo-bar-baz"

Takes a whole keyword and generate a part good for `name` usage,
including the ns potentially. :foo.bar/baz -> "foo-bar-baz"
raw docstring

command-specclj

(command-spec ns k scope)

compile-specclj


gen-commands-specs!clj

(gen-commands-specs! {:blueprint.registry/keys [commands ns]})

gen-multi-spec-defmulti!clj

(gen-multi-spec-defmulti! mm-sym dispatch alternatives default ctx)

gen-resources-specs!clj

(gen-resources-specs! {:blueprint.registry/keys [resources ns]})

gen-spec!clj

(gen-spec! spec-key spec-form meta)

gen-spec-for-resource!clj

(gen-spec-for-resource! ns spec-key resource-def)

generate-specs!clj

(generate-specs! api-def)

resource-nsclj

(resource-ns ns)

resource-specclj

(resource-spec ns k)

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

× close