File tree Expand file tree Collapse file tree 6 files changed +22
-6
lines changed Expand file tree Collapse file tree 6 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 11See also: [ compojure-api 1.1.x changelog] ( ./CHANGELOG-1.1.x.md )
22
3+ ## Next
4+ * Lazily load spec and schema coercion support to preserve Clojure 1.8 support for 1.1.x
5+
36## 2.0.0-alpha34-SNAPSHOT
47* ** BREAKING CHANGE** : ` :formatter :muuntaja ` sometimes required for ` api{-middleware} ` options
58 * to prepare for 1.x compatibility, : muuntaja must be explicitly configured
Original file line number Diff line number Diff line change 33 [compojure.api.exception :as ex]
44 [compojure.api.request :as request]
55 [compojure.api.coercion.core :as cc]
6- [compojure.api.coercion.schema]
7- [compojure.api.coercion.spec])
6+ ; ; side effects
7+ compojure.api.coercion.register-schema
8+ compojure.api.coercion.register-spec)
89 (:import (compojure.api.coercion.core CoercionError)))
910
1011(def default-coercion :schema )
Original file line number Diff line number Diff line change 1+ (ns compojure.api.coercion.register-schema
2+ (:require [compojure.api.coercion.core :as cc]))
3+
4+ (defmethod cc /named-coercion :schema [_]
5+ (deref
6+ (or (resolve 'compojure.api.coercion.schema/default-coercion)
7+ (do (require 'compojure.api.coercion.schema)
8+ (resolve 'compojure.api.coercion.schema/default-coercion)))))
Original file line number Diff line number Diff line change 1+ (ns compojure.api.coercion.register-spec
2+ (:require [compojure.api.coercion.core :as cc]))
3+
4+ (defmethod cc /named-coercion :spec [_]
5+ (deref
6+ (or (resolve 'compojure.api.coercion.spec/default-coercion)
7+ (do (require 'compojure.api.coercion.spec)
8+ (resolve 'compojure.api.coercion.spec/default-coercion)))))
Original file line number Diff line number Diff line change 8484 (->SchemaCoercion :schema options))
8585
8686(def default-coercion (create-coercion default-options ))
87-
88- (defmethod cc /named-coercion :schema [_] default-coercion )
Original file line number Diff line number Diff line change 149149 (->SpecCoercion :spec options))
150150
151151(def default-coercion (create-coercion default-options ))
152-
153- (defmethod cc /named-coercion :spec [_] default-coercion )
You can’t perform that action at this time.
0 commit comments