-
-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
When defining a GET route for a generic action, if we define optional arguments they are not accepted as query params.
In the open_api spec they are shown as part of the request body inside data
but this also does not work unless we change the Route to POST.
To Reproduce
base_route "/operational-settings", Core.OperationalSetting do
route(:get, "/:configuration_key", :get)
end
action :get, :struct do
constraints instance_of: Type.OperationalSettingValue
argument :configuration_key, :string, allow_nil?: false
argument :campaign_id, :string, allow_nil?: true
run fn input, context ->
get_setting(input.arguments, context.actor)
end
end
Expected behavior
In the example above the mandatory path param configuration_key works as expected but the campaign_id is not accepted as query_param.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Type
Projects
Status
Soon