mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
offer both swagger & openapi docs in ui
This commit is contained in:
parent
814c8b88e2
commit
25b75c877a
1 changed files with 5 additions and 2 deletions
|
|
@ -43,7 +43,7 @@
|
|||
[["/swagger.json"
|
||||
{:get {:no-doc true
|
||||
:swagger {:info {:title "my-api"
|
||||
:description "with reitit-http"}
|
||||
:description "swagger-docs with reitit-http"}
|
||||
;; used in /secure APIs below
|
||||
:securityDefinitions {"auth" {:type :apiKey
|
||||
:in :header
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
["/openapi.json"
|
||||
{:get {:no-doc true
|
||||
:openapi {:info {:title "my-api"
|
||||
:description "with reitit-http"
|
||||
:description "openap-docs with reitit-http"
|
||||
:version "0.0.1"}
|
||||
;; used in /secure APIs below
|
||||
:components {:securitySchemes {"auth" {:type :apiKey
|
||||
|
|
@ -174,6 +174,9 @@
|
|||
(swagger-ui/create-swagger-ui-handler
|
||||
{:path "/"
|
||||
:config {:validatorUrl nil
|
||||
:urls [{:name "swagger", :url "swagger.json"}
|
||||
{:name "openapi", :url "openapi.json"}]
|
||||
:urls.primaryName "openapi"
|
||||
:operationsSorter "alpha"}})
|
||||
(ring/create-default-handler))
|
||||
{:executor sieppari/executor}))
|
||||
|
|
|
|||
Loading…
Reference in a new issue