mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
Set closed specs in http-swagger example
This commit is contained in:
parent
674b60a124
commit
dd864a0142
1 changed files with 3 additions and 2 deletions
|
|
@ -13,6 +13,7 @@
|
|||
[reitit.http.interceptors.dev :as dev]
|
||||
[reitit.interceptor.sieppari :as sieppari]
|
||||
[reitit.dev.pretty :as pretty]
|
||||
[spec-tools.spell :as spell]
|
||||
[ring.adapter.jetty :as jetty]
|
||||
[aleph.http :as client]
|
||||
[muuntaja.core :as m]
|
||||
|
|
@ -74,7 +75,7 @@
|
|||
"https://randomuser.me/api/"
|
||||
{:query-params {:seed seed, :results results}})
|
||||
:body
|
||||
(partial m/decode m/instance "application/json")
|
||||
(partial m/decode "application/json")
|
||||
:results
|
||||
(fn [results]
|
||||
{:status 200
|
||||
|
|
@ -112,7 +113,7 @@
|
|||
:body {:total (- x y)}})}}]]]
|
||||
|
||||
{;;:reitit.interceptor/transform dev/print-context-diffs
|
||||
;;:wrap-spec reitit.dev.pretty/closed-keys
|
||||
:wrap-spec spell/closed-keys
|
||||
:validate spec/validate
|
||||
:exception pretty/exception
|
||||
:data {:coercion spec-coercion/coercion
|
||||
|
|
|
|||
Loading…
Reference in a new issue