Liking cljdoc? Tell your friends :D

reitit.swagger-ui


create-swagger-ui-handler

(create-swagger-ui-handler)
(create-swagger-ui-handler options)

Creates a ring handler which can be used to serve swagger-ui.

keydescription
:parameteroptional name of the wildcard parameter, defaults to unnamed keyword :
:rootoptional resource root, defaults to "swagger-ui"
:urlpath to swagger endpoint, defaults to /swagger.json
:pathoptional path to mount the handler to. Works only if mounted outside of a router.
:configparameters passed to swaggger-ui as-is.

See https://github.com/swagger-api/swagger-ui/tree/2.x#parameters for all available :config options

Examples:

;; with defaults (create-swagger-ui-handler)

;; with path and url set, swagger validator disabled, jsonEditor enabled (swagger-ui/create-swagger-ui-handler {:path "/" :url "/api/swagger.json" :config {:validatorUrl nil :jsonEditor true})

Creates a ring handler which can be used to serve swagger-ui.

| key              | description |
| -----------------|-------------|
| :parameter       | optional name of the wildcard parameter, defaults to unnamed keyword `:`
| :root            | optional resource root, defaults to `"swagger-ui"`
| :url             | path to swagger endpoint, defaults to `/swagger.json`
| :path            | optional path to mount the handler to. Works only if mounted outside of a router.
| :config          | parameters passed to swaggger-ui as-is.

See https://github.com/swagger-api/swagger-ui/tree/2.x#parameters
for all available :config options

Examples:

   ;; with defaults
   (create-swagger-ui-handler)

   ;; with path and url set, swagger validator disabled, jsonEditor enabled
   (swagger-ui/create-swagger-ui-handler
     {:path "/"
      :url "/api/swagger.json"
      :config {:validatorUrl nil
               :jsonEditor true})
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close