mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 08:51:12 +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.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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue