File tree Expand file tree Collapse file tree
lib/ash_json_api/json_schema Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1686,15 +1686,19 @@ if Code.ensure_loaded?(OpenApiSpex) do
16861686
16871687 { query_params , _unused_schema } =
16881688 if route . method == :get do
1689- Enum . flat_map ( Ash.Resource.Info . action_inputs ( resource , route . action ) , fn input ->
1690- with true <- is_atom ( input ) ,
1691- arg when not is_nil ( arg ) <-
1692- Enum . find ( action . arguments , & ( & 1 . name == input ) ) ||
1693- Ash.Resource.Info . attribute ( resource , input ) do
1689+ resource
1690+ |> Ash.Resource.Info . action_inputs ( route . action )
1691+ |> Enum . filter ( & is_atom / 1 )
1692+ |> Enum . sort ( )
1693+ |> Enum . flat_map ( fn input ->
1694+ arg =
1695+ Enum . find ( action . arguments , & ( & 1 . name == input ) ) ||
1696+ Ash.Resource.Info . attribute ( resource , input )
1697+
1698+ if arg do
16941699 [ arg ]
16951700 else
1696- _ ->
1697- [ ]
1701+ [ ]
16981702 end
16991703 end )
17001704 else
You can’t perform that action at this time.
0 commit comments