 
 (defn exec-app
   [op-i req]
+  (clojure.tools.logging/log :info "Dispatching request to " op-i)
   (let [req2 (dissoc req :swagger)
         req2 (assoc req2 :body (get-in req [:parameters :body]))]
     (let [uuid (.toString (UUID/randomUUID))

                     :class   op-i
                     :replyTo uuid
                     :body    (if (:body req2) (json/generate-string (:body req2)) nil)})
      (let [answer (deref p 10000 ::failed)]
        (if (= ::failed answer)
          {:status 500 :headers {"Content-Type" "text/plain"} :body "Didn't get the answer"}
          (let [response (:response answer)
                response (update response :headers fu/stringify-keys)
                response (if (and (:body response) (:decodeBody answer))


(defn http-handler
  [req]
  (clojure.tools.logging/log :info "Incoming request to " (:uri req))
  (if-let [swagger (::swagger @shim-socket)]
    (let [app (make-app swagger)
          resp (app req)]
      resp
      )
    (do
      (clojure.tools.logging/log :info "No Connection from dev-shim or no Swagger file defined")
      {:status 404 :headers {"Content-Type" "text/plain"} :body "No Swagger Defined. Unable to route request\n"})
    ))

(defonce end-server (atom nil))
