mix jido_action. gen. action
(Jido Action v2.3.0)
View Source
Generates a Jido Action module
Usage
mix jido_action.gen.action MyApp.Actions.FetchWeatherOptions
--no-test- Skip generating the test file
Generated Files
This task generates:
- An action module at
lib/my_app/actions/fetch_weather.ex - A test file at
test/my_app/actions/fetch_weather_test.exs(unless--no-test)
Example
mix jido_action.gen.action MyApp.Actions.SendEmailGenerates:
defmodule MyApp.Actions.SendEmail do
use Jido.Action,
name: "send_email",
description: "TODO: Add description",
schema: []
@impl true
def run(_params, _context) do
{:ok, %{}}
end
end