     [swag.core :refer (swagger-routes GET- POST- PUT- DELETE- defroutes- errors )]
     [compojure.handler :as handler]
     [cemerick.friend :as friend]
-    [compojure.route :as route])) 
+    [compojure.route :as route]))
 
 (import-logging)
 


(ns celestial.api
  (:refer-clojure :exclude [type])
  (:use 
    [celestial.users-api :only (users quotas)]
    [celestial.ui-api :only (public sessions)]
    [compojure.core :only (defroutes routes)] 
    [metrics.ring.expose :only  (expose-metrics-as-json)]
    [celestial.roles :only (roles roles-m admin)]
    [clojure.core.strint :only (<<)]
    [slingshot.slingshot :only  [throw+ try+]]
    [ring.middleware.format :only [wrap-restful-format]]
    [ring.middleware.params :only (wrap-params)]
    [metrics.ring.instrument :only  (instrument)]
    [swag.model :only (defmodel wrap-swag)]
    [celestial.common :only (import-logging get! resp conflict success version wrap-errors)])
  (:require 
    [celestial.persistency :as p]
    [celestial.security :as sec]
    [celestial.api.systems :refer (systems environments)]

      (wrap-session {:cookie-name "celestial" :store (cookie-store)})
      (wrap-restful-format :formats [:json-kw :edn :yaml-kw :yaml-in-html])
      (handler/api)
      (instrument)
      (error-wrap)))
