Set closed specs in http-swagger example

This commit is contained in:
Tommi Reiman 2019-04-20 01:04:45 -04:00
parent 674b60a124
commit dd864a0142

View file

@ -13,6 +13,7 @@
[reitit.http.interceptors.dev :as dev] [reitit.http.interceptors.dev :as dev]
[reitit.interceptor.sieppari :as sieppari] [reitit.interceptor.sieppari :as sieppari]
[reitit.dev.pretty :as pretty] [reitit.dev.pretty :as pretty]
[spec-tools.spell :as spell]
[ring.adapter.jetty :as jetty] [ring.adapter.jetty :as jetty]
[aleph.http :as client] [aleph.http :as client]
[muuntaja.core :as m] [muuntaja.core :as m]
@ -74,7 +75,7 @@
"https://randomuser.me/api/" "https://randomuser.me/api/"
{:query-params {:seed seed, :results results}}) {:query-params {:seed seed, :results results}})
:body :body
(partial m/decode m/instance "application/json") (partial m/decode "application/json")
:results :results
(fn [results] (fn [results]
{:status 200 {:status 200
@ -112,7 +113,7 @@
:body {:total (- x y)}})}}]]] :body {:total (- x y)}})}}]]]
{;;:reitit.interceptor/transform dev/print-context-diffs {;;:reitit.interceptor/transform dev/print-context-diffs
;;:wrap-spec reitit.dev.pretty/closed-keys :wrap-spec spell/closed-keys
:validate spec/validate :validate spec/validate
:exception pretty/exception :exception pretty/exception
:data {:coercion spec-coercion/coercion :data {:coercion spec-coercion/coercion