Releases: janfoeh/apidiesel
v0.15
v0.14
v0.13
New features
-
more flexible action URLs with placeholders
In addition to the existing abilities - setting an actions URL as a
String
, modifyingURI
parts or supplying aProc
that receives the base URL and the current request - you can now use the actions parameters as placeholders:class GetUserRepos < Apidiesel::Action url path: '/users/%{username}/repos' expects do string :username, submit: false end end
-
prevent action arguments from being submitted with
submit: false
As seen above, arguments with the
submit: false
flag are not included in the request body. -
new
boolean
response typeboolean :is_required, truthy: 1, falsy: 0
-
code examples
I've added a small example for listing a users Github repos. Hopefully there are more varied examples to come in the future.
Changes
-
Request#action_arguments
vs.Request#parameters
We now preserve the action arguments, so even if you removed one in
format_parameters
, it's still available for URL substitution and inRequest#action_arguments
. -
bin/console
now uses Pry -
Documentation
yard
is now a dev dependency, and I've started to clean up the documentation. While developing, runyard server --reload
in order to access the docs at http://localhost:8088