Skip to content

Instantly share code, notes, and snippets.

@marshallbrekka
Created December 10, 2014 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshallbrekka/316c7c86f3fbba01b19c to your computer and use it in GitHub Desktop.
Save marshallbrekka/316c7c86f3fbba01b19c to your computer and use it in GitHub Desktop.
(def input-schema {(optional-key :id) Number})
(def output-schema [{:id Number
:balance Number
:name String}])
(defvalidatedfn get-accounts [params]
[input-schema => output-schema]
(i/get-accounts params))
(defpersistent :mobile "accounts" "1" "accounts"
{:fn get-accounts
:in-examples [{:id 123}]
:out-examples [[{:id 123
:balance 7866.09
:name "My Checking"}]]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment