File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
src/compojure/api/coercion Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1616 (st/type-transformer
1717 st/string-transformer
1818 st/strip-extra-keys-transformer
19- {:name :strict- string }))
19+ {:name :string }))
2020
2121(def json-transformer
2222 (st/type-transformer
2323 st/json-transformer
2424 st/strip-extra-keys-transformer
25- {:name :strict- json }))
25+ {:name :json }))
2626
27- (def default-transformer
28- (st/type-transformer ))
27+ (defn default-transformer
28+ ([] (default-transformer :default ))
29+ ([name] (st/type-transformer {:name name})))
2930
3031(defprotocol Specify
3132 (specify [this name]))
134135 (cc/coerce-request this spec value type format request)))
135136
136137(def default-options
137- {:body {:default default-transformer
138+ {:body {:default ( default-transformer )
138139 :formats {" application/json" json-transformer
139140 " application/msgpack" json-transformer
140141 " application/x-yaml" json-transformer}}
141142 :string {:default string-transformer}
142- :response {:default default-transformer }})
143+ :response {:default (default-transformer )
144+ :formats {" application/json" (default-transformer :json )
145+ " application/msgpack" (default-transformer :json )
146+ " application/x-yaml" (default-transformer :json )}}})
143147
144148(defn create-coercion [options]
145149 (->SpecCoercion :spec options))
You can’t perform that action at this time.
0 commit comments