    NamespacedEntries))
 
 (s/defschema AuthSchemes
-  {(s/optional-key :authentication-schemes) (s/conditional fn? (s/=> [AuthScheme] Context) :else [AuthScheme])})
+  {(s/optional-key :authentication-schemes) (maybe-dynamic [AuthScheme])})
 
 ;; Authorization can contain any content because it is up to the
 ;; authorization interceptor, which is pluggable.


(s/defschema Context {})

(s/defschema ContextFunction
  (s/=> s/Any Context))

(s/defschema Produces
  {(s/optional-key :produces) (s/conditional
                               fn? ContextFunction
                               :else [Representation])})
(s/defschema Consumes
  {(s/optional-key :consumes) (s/conditional
                               fn? ContextFunction
                               :else [Representation])})

(s/defschema Response
  {:response ContextFunction})

(s/defschema Cors
  {(s/optional-key :allow-origin) (s/conditional fn? (s/=> (s/conditional ifn? #{s/Str} :else s/Str) Context) :else StringSet)
   (s/optional-key :allow-credentials) s/Bool
   (s/optional-key :expose-headers) (maybe-dynamic Strings)
   (s/optional-key :max-age) (maybe-dynamic s/Int)
   (s/optional-key :allow-methods) (maybe-dynamic Keywords)
   (s/optional-key :allow-headers) (maybe-dynamic Strings)})

(s/defschema AccessControlValue
  (merge Realms Cors NamespacedEntries))
