 (schema/defn ^:always-validate add-websocket-handler!
   [context webserver-service
    svc :- (schema/protocol tk-services/Service)
-   handlers options :- RouteOption]
+   handlers options :- CommonOptions]
   (let [{:keys [path opts]}   (compute-common-elements context svc options)
         add-websocket-handler (:add-websocket-handler webserver-service)]
     (add-websocket-handler handlers path opts)))

(schema/defn ^:always-validate add-ring-handler!
  [context webserver-service
   svc :- (schema/protocol tk-services/Service)
   handler options :- RouteOption]
  (let [{:keys [path opts]} (compute-common-elements context svc options)
        add-ring-handler    (:add-ring-handler webserver-service)]
    (add-ring-handler handler path opts)))


(def RouteOption
  {(schema/optional-key :route-id) schema/Keyword})

(def CommonOptions
  (dissoc (merge jetty9-core/CommonOptions RouteOption) :server-id))

(def ContextHandlerOptions
  (dissoc (merge jetty9-core/ContextHandlerOptions RouteOption) :server-id))
