CrossClj

2.0.0-alpha20 docs

SourceDocs



RECENT
    VARS
    base-path
    post-process-swagger-spec
    swagger-defaults
    swagger-docs
    swagger-routes
    swagger-spec-path
    swagger-ui
    transform-operations

    « Index of all namespaces of this project

    (base-path request)
    (swagger-docs {:keys [path], :or {path "/swagger.json"}, :as options})
    (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 app)
    (swagger-ui options)
    (transform-operations swagger)