Last active
August 29, 2015 14:01
-
-
Save wunki/29705e712569c3b223c1 to your computer and use it in GitHub Desktop.
Is it possible with fnhouse to default limit to a certain value if it's not supplied? Currently it also raises an `missing-required-key` when it's not supplied because of the `s/Int`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defnk $GET | |
{:responses {200 schemas/SomeSchema} | |
[[:request | |
[:query-params limit :- s/Int] | |
:as req] | |
[:resources flow :- FlowResource]] | |
(...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, just use the optional key support, e.g.
{limit :- s/Int 20}