Skip to content

Commit

Permalink
remove loading race conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Jun 6, 2024
1 parent 8d3c17d commit 7e4f63b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/compojure/api/coercion.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[compojure.api.request :as request]
[compojure.api.coercion.core :as cc]
;; side effects
compojure.api.coercion.register-schema
compojure.api.coercion.register-spec)
compojure.api.coercion.schema
compojure.api.coercion.spec)
(:import (compojure.api.coercion.core CoercionError)))

(def default-coercion :schema)
Expand Down
8 changes: 0 additions & 8 deletions src/compojure/api/coercion/register_schema.clj

This file was deleted.

8 changes: 0 additions & 8 deletions src/compojure/api/coercion/register_spec.clj

This file was deleted.

6 changes: 3 additions & 3 deletions src/compojure/api/coercion/schema.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
[compojure.api.coercion.core :as cc]
[clojure.walk :as walk]
[schema.core :as s]
[compojure.api.common :as common]
;; side effects
compojure.api.coercion.register-schema)
[compojure.api.common :as common])
(:import (java.io File)
(schema.core OptionalKey RequiredKey)
(schema.utils ValidationError NamedError)))
Expand Down Expand Up @@ -86,3 +84,5 @@
(->SchemaCoercion :schema options))

(def default-coercion (create-coercion default-options))

(defmethod cc/named-coercion :schema [_] default-coercion)
6 changes: 3 additions & 3 deletions src/compojure/api/coercion/spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
[clojure.walk :as walk]
[compojure.api.coercion.core :as cc]
[spec-tools.swagger.core :as swagger]
[compojure.api.common :as common]
;; side effects
compojure.api.coercion.register-spec)
[compojure.api.common :as common])
(:import (clojure.lang IPersistentMap)
(schema.core RequiredKey OptionalKey)
(spec_tools.core Spec)
Expand Down Expand Up @@ -151,3 +149,5 @@
(->SpecCoercion :spec options))

(def default-coercion (create-coercion default-options))

(defmethod cc/named-coercion :spec [_] default-coercion)

0 comments on commit 7e4f63b

Please sign in to comment.