ash-project / ash_json_api

The JSON:API extension for the Ash Framework
https://hexdocs.pm/ash_json_api
MIT License
55 stars 41 forks source link

Support for Optional Parameters in Generic Action #192

Closed diogo-felix-martins closed 1 month ago

diogo-felix-martins commented 1 month ago

At the moment there doesn't seem to be a way to pass optional parameters to a generic action. So if there are any required arguments in the action an error is raised.

The way to have parameters now are path params but with query params they could be optional.

route :get, "/:foo/:bar/:baz", :read_data

Maybe the generic action arguments could be parsed from the query params.