Skip to content

Commit

Permalink
fix credo complain when using apply/3
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Torres committed Dec 16, 2024
1 parent 3517ab4 commit 7c5e2d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/open_api_spex/cast.ex
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ defmodule OpenApiSpex.Cast do
do: module.cast(ctx)

def cast(%__MODULE__{schema: %{"x-validate": module}} = ctx) when is_binary(module),
do: module |> Elixir.String.split(".") |> Module.concat() |> apply(:cast, [ctx])
do: module |> Elixir.String.split(".") |> Module.concat() |> then(& &1.cast(ctx))

# nil schema
def cast(%__MODULE__{value: value, schema: nil}),
Expand Down

0 comments on commit 7c5e2d7

Please sign in to comment.