Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes (1.1.0) #230

Merged
merged 12 commits into from Apr 24, 2016
Merged

Small fixes (1.1.0) #230

merged 12 commits into from Apr 24, 2016

Conversation

ikitommi
Copy link
Member

  • BREAKING: Move compojure.api.swgger/validate to compojure.api.validator/validate.
  • BREAKING: If a resource doesn't define a handler for a given request-method or for top-level, nil is returned (instead of throwing exeption)
  • BREAKING Resource-routing is done by context. Trying to return a compojure.api.routing/Route from an endpoint like ANY will throw descriptive (runtime-)exception.
(context "/hello" []
  (resource
    {:description "hello-resource"
     :responses {200 {:schema {:message s/Str}}}
     :post {:summary "post-hello"
            :parameters {:body-params {:name s/Str}}
            :handler (fnk [[:body-params name]]
                       (ok {:message (format "hello, %s!" name)}))}
     :get {:summary "get-hello"
           :parameters {:query-params {:name s/Str}}
           :handler (fnk [[:query-params name]]
                      (ok {:message (format "hello, %s!" name)}))}}))
  • api-level swagger-options default to {:ui nil, :spec nil}. Setting up just the spec or ui, doesn't automatically setup the other (like previously)
  • Strip nils from :middleware, fixes #228
  • Support compojure-api apps in Google App Engine by allowing scjsv to be excluded (uses json-schema-validator, which uses rogue threads):
[metosin/compojure-api "1.1.0" :exclusions [[metosin/scjsv]]]

@ikitommi ikitommi merged commit b2fa0e5 into master Apr 24, 2016
@ikitommi ikitommi deleted the 1.1.0 branch December 25, 2016 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow nils in :middleware vector
1 participant