Unify naming of schema registering functions

This commit is contained in:
Andrey Antukh 2024-06-05 13:00:30 +02:00
parent 2921b62b37
commit d2bedec59c
24 changed files with 119 additions and 123 deletions

View file

@ -47,7 +47,7 @@
(s/keys :req-un [::path]
:opt-un [::mtype]))
(sm/def! ::fs/path
(sm/register! ::fs/path
{:type ::fs/path
:pred fs/path?
:type-properties
@ -59,7 +59,7 @@
::oapi/format "unix-path"
::oapi/decode fs/path}})
(sm/def! ::upload
(sm/register! ::upload
[:map {:title "Upload"}
[:filename :string]
[:size :int]

View file

@ -12,7 +12,7 @@
[app.common.spec :as us]
[clojure.spec.alpha :as s]))
(sm/def! ::permissions
(sm/register! ::permissions
[:map {:title "Permissions"}
[:type {:gen/elements [:membership :share-link]} :keyword]
[:is-owner :boolean]

View file

@ -368,7 +368,7 @@
(let [p1 (System/nanoTime)]
#(duration {:nanos (- (System/nanoTime) p1)})))
(sm/def! ::instant
(sm/register! ::instant
{:type ::instant
:pred instant?
:type-properties
@ -379,7 +379,7 @@
::oapi/type "string"
::oapi/format "iso"}})
(sm/def! ::duration
(sm/register! ::duration
{:type :durations
:pred duration?
:type-properties