Skip to content

Commit 23b96cb

Browse files
committed
remove loading race conditions
1 parent 80b524b commit 23b96cb

File tree

5 files changed

+8
-24
lines changed

5 files changed

+8
-24
lines changed

src/compojure/api/coercion.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[compojure.api.request :as request]
55
[compojure.api.coercion.core :as cc]
66
;; side effects
7-
compojure.api.coercion.register-schema
8-
compojure.api.coercion.register-spec)
7+
compojure.api.coercion.schema
8+
compojure.api.coercion.spec)
99
(:import (compojure.api.coercion.core CoercionError)))
1010

1111
(def default-coercion :schema)

src/compojure/api/coercion/register_schema.clj

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/compojure/api/coercion/register_spec.clj

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/compojure/api/coercion/schema.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
[compojure.api.coercion.core :as cc]
66
[clojure.walk :as walk]
77
[schema.core :as s]
8-
[compojure.api.common :as common]
9-
;; side effects
10-
compojure.api.coercion.register-schema)
8+
[compojure.api.common :as common])
119
(:import (java.io File)
1210
(schema.core OptionalKey RequiredKey)
1311
(schema.utils ValidationError NamedError)))
@@ -90,3 +88,5 @@
9088
(->SchemaCoercion :schema options))
9189

9290
(def default-coercion (create-coercion default-options))
91+
92+
(defmethod cc/named-coercion :schema [_] default-coercion)

src/compojure/api/coercion/spec.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
[clojure.walk :as walk]
77
[compojure.api.coercion.core :as cc]
88
[spec-tools.swagger.core :as swagger]
9-
[compojure.api.common :as common]
10-
;; side effects
11-
compojure.api.coercion.register-spec)
9+
[compojure.api.common :as common])
1210
(:import (clojure.lang IPersistentMap)
1311
(schema.core RequiredKey OptionalKey)
1412
(spec_tools.core Spec)
@@ -151,3 +149,5 @@
151149
(->SpecCoercion :spec options))
152150

153151
(def default-coercion (create-coercion default-options))
152+
153+
(defmethod cc/named-coercion :spec [_] default-coercion)

0 commit comments

Comments
 (0)