Compojure-api Api Documentation

Version: 2.0.0-alpha28

compojure.api.swagger

base-path

(base-path request)

swagger-docs

(swagger-docs {:keys [path], :or {path "/swagger.json"}, :as options})

swagger-routes

(swagger-routes)(swagger-routes options)

Returns routes for swagger-articats (ui & spec). Accepts an options map, with the following options:

:ui Path for the swagger-ui (defaults to “/”). Setting the value to nil will cause the swagger-ui not to be mounted

:spec Path for the swagger-spec (defaults to “/swagger.json”) Setting the value to nil will cause the swagger-ui not to be mounted

:data Swagger data in the Ring-Swagger format.

:options :ui Options to configure the ui :spec Options to configure the spec. Nada at the moment.

Example options:

{:ui “/api-docs” :spec “/swagger.json” :options {:ui {:jsonEditor true} :spec {}} :data {:basePath “/app” :info {:version “1.0.0” :title “Sausages” :description “Sausage description” :termsOfService “http://helloreverb.com/terms/” :contact {:name “My API Team” :email “foo@example.com” :url “http://www.metosin.fi"} :license {:name: ”Eclipse Public License“ :url: ”http://www.eclipse.org/legal/epl-v10.html"}} :tags [{:name “sausages”, :description “Sausage api-set”}]}}

swagger-spec-path

(swagger-spec-path app)

swagger-ui

(swagger-ui options)

transform-operations

(transform-operations swagger)