mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 17:01:11 +00:00
fix: enable validation in examples/openapi, make it pass
This commit is contained in:
parent
557c89acdd
commit
b0b9f8cbee
1 changed files with 3 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
(ns example.server
|
(ns example.server
|
||||||
(:require [reitit.ring :as ring]
|
(:require [reitit.ring :as ring]
|
||||||
|
[reitit.ring.spec]
|
||||||
[reitit.coercion.malli]
|
[reitit.coercion.malli]
|
||||||
[reitit.openapi :as openapi]
|
[reitit.openapi :as openapi]
|
||||||
[reitit.ring.malli]
|
[reitit.ring.malli]
|
||||||
|
|
@ -94,7 +95,7 @@
|
||||||
:email "heidi@alps.ch"}])}}]
|
:email "heidi@alps.ch"}])}}]
|
||||||
|
|
||||||
["/secure"
|
["/secure"
|
||||||
{:tags ["secure"]
|
{:tags #{"secure"}
|
||||||
:openapi {:security [{"auth" []}]}}
|
:openapi {:security [{"auth" []}]}}
|
||||||
["/get"
|
["/get"
|
||||||
{:get {:summary "endpoint authenticated with a header"
|
{:get {:summary "endpoint authenticated with a header"
|
||||||
|
|
@ -109,6 +110,7 @@
|
||||||
:body {:error "unauthorized"}}))}}]]]
|
:body {:error "unauthorized"}}))}}]]]
|
||||||
|
|
||||||
{;;:reitit.middleware/transform dev/print-request-diffs ;; pretty diffs
|
{;;:reitit.middleware/transform dev/print-request-diffs ;; pretty diffs
|
||||||
|
:validate reitit.ring.spec/validate
|
||||||
:exception pretty/exception
|
:exception pretty/exception
|
||||||
:data {:coercion reitit.coercion.malli/coercion
|
:data {:coercion reitit.coercion.malli/coercion
|
||||||
:muuntaja m/instance
|
:muuntaja m/instance
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue