    [ring.middleware.format]
    [ring.middleware.params]
    [buddy.auth.middleware :refer [wrap-authentication]]
-
+   [ruuvi.resources.websocket :as websocket]
    [ruuvi.swagger :as swagger]
    [ruuvi.middleware :as middleware]
    [ruuvi.security :as sec]

       {:context ["api"]
        :swagger-options swagger/swagger-options
        :default-middleware sv/wrap-with-schema-validation}
       ["meta" 'ruuvi.resources.meta]
       ["auth" 'ruuvi.resources.auth]
       ["events" 'ruuvi.resources.events]

  component/Lifecycle
  (start [component]
         (debug "RingHandler starting")
         (let [component-app (-> (create-handler component development)
                                 (websocket/websocket-middleware "/api/websocket"))]
           (assoc component :app component-app)))
  (stop [component]
        (debug "RingHandler stopping")
