   (merge PropertiesMappings
          RepresentationSeqMappings
          MethodsMappings
-         AccessControlMappings))
+         CorsMappings))
 
 (def resource-coercer (sc/coercer Resource ResourceMappings))
 

    (s/optional-key :allow-methods) (s/conditional fn? ContextFunction :else Keywords)
    (s/optional-key :allow-headers) (s/conditional fn? ContextFunction :else Strings)}})

(def Realm s/Str)

(s/defschema AccessControl
  (merge Cors
         {(s/optional-key :authentication)
          {(s/optional-key :realms)
           {Realm {:schemes [{(s/optional-key :scheme) s/Str
                              (s/optional-key :authenticator) s/Any}]}}}}))

(def AccessControlMappings
  (merge HeaderMappings {ContextFunction as-fn}))

(s/defschema ResourceDocumentation
  CommonDocumentation)

(s/defschema ResourceBase
  (merge {(s/optional-key :id) s/Any}
         ResourceDocumentation
         AccessControl
         Properties
         ResourceParameters
         Produces

   :known-methods {s/Keyword s/Any}
   :interceptor-chain [(s/=> Context Context)]
   (s/optional-key :path-info?) s/Bool})


