mirror of
https://github.com/metosin/reitit.git
synced 2026-02-12 06:15:17 +00:00
examples/openapi: fix /complex example
This commit is contained in:
parent
373ea9bb62
commit
bf18586d75
2 changed files with 9 additions and 8 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
[metosin/jsonista "0.3.8"]
|
[metosin/jsonista "0.3.8"]
|
||||||
[ring/ring-jetty-adapter "1.12.1"]
|
[ring/ring-jetty-adapter "1.12.1"]
|
||||||
[metosin/reitit "0.10.0"]
|
[metosin/reitit "0.10.0"]
|
||||||
[metosin/ring-swagger-ui "5.9.0"]]
|
[metosin/ring-swagger-ui "5.9.0"]
|
||||||
|
[org.slf4j/slf4j-simple "2.0.9"]]
|
||||||
:repl-options {:init-ns example.server}
|
:repl-options {:init-ns example.server}
|
||||||
:profiles {:dev {:dependencies [[ring/ring-mock "0.4.0"]]}})
|
:profiles {:dev {:dependencies [[ring/ring-mock "0.4.0"]]}})
|
||||||
|
|
|
||||||
|
|
@ -156,22 +156,22 @@
|
||||||
[:regex [:re "[0-9]+"]]
|
[:regex [:re "[0-9]+"]]
|
||||||
[:enum [:enum 1 3 5 42]]
|
[:enum [:enum 1 3 5 42]]
|
||||||
[:multi [:multi {:dispatch :type}
|
[:multi [:multi {:dispatch :type}
|
||||||
[:literal [:map
|
["literal" [:map
|
||||||
[:type [:= :literal]]
|
[:type [:= "literal"]]
|
||||||
[:value [:or :int :string]]]]
|
[:value [:or :int :string]]]]
|
||||||
[:reference [:map
|
["reference" [:map
|
||||||
[:type [:= :reference]]
|
[:type [:= "reference"]]
|
||||||
[:description :string]
|
[:description :string]
|
||||||
[:ref :uuid]]]]]]
|
[:ref :uuid]]]]]]
|
||||||
:example {:vector-of-tuples [["a" 1] ["b" 2]]
|
:example {:vector-of-tuples [["a" 1] ["b" 2]]
|
||||||
:regex "01234"
|
:regex "01234"
|
||||||
:enum 5
|
:enum 5
|
||||||
:multi {:type :literal
|
:multi {:type "literal"
|
||||||
:value "x"}}}}}
|
:value "x"}}}}}
|
||||||
:responses {200 {:content {:default {:schema [:map]}}}}
|
:responses {200 {:content {:default {:schema [:map-of :keyword :any]}}}}
|
||||||
:handler (fn [request]
|
:handler (fn [request]
|
||||||
{:status 200
|
{:status 200
|
||||||
:body (:body request)})}}]
|
:body (get-in request [:parameters :request])})}}]
|
||||||
|
|
||||||
["/secure"
|
["/secure"
|
||||||
{:tags #{"secure"}
|
{:tags #{"secure"}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue