zalando / friboo

Utility library for writing microservices in Clojure, with support for Swagger and OAuth
Apache License 2.0
119 stars 16 forks source link

Generate controller functions based on the API specification. #93

Open dryewo opened 8 years ago

dryewo commented 8 years ago
$ lein new friboo my-new-project -- apis/my-new-project.yaml

This call should copy the file into the new project and generate corresponding controller functions:

(defn get-hello [controller params request]
  (response {:message "OK"}))

Optionally, it's even possible to infer parameter names and generate them too:

(defn get-hello [controller {:keys [name size offset] :as params} request]
  (response {:message "OK"}))