CrossClj

0.1.1 docs

SourceDocs



RECENT

    schema-compojure

    Clojars

    Dec 25, 2014


    Readme

    Index of all namespaces


    The README below is fetched from the published project artifact. Some relative links may be broken.

    ru.prepor/schema-compojure

    Travis status

    Clojars Project

    This is Compojure based library for integration with Prismatic’s fnk syntax and Schema validation and coercion. See ru.prepor.component for integration with component

    Usage

    (require '[ru.prepor.schema-compojure :refer [defroutes context GET]])
    
    (defroutes app {:matcher coerce/string-coercion-matcher}
      (context "/admin" []
        (context "/users/:id" [[:params id :- s/Int]]
          (GET "/" []
            (format "Hello, %s" (inc id)))))
      (GET "/" [] "Hello world!"))
    
    (prn "Result" (app {:request-method :get :uri "/admin/users/2"}))
    

    License

    Copyright © 2014 FIXME

    Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.