A macro that generates common effective_* functions for configuration structs.
Both ActionConfig and MfaConfig share the same nil-fallback pattern for
resolving effective field values. This macro generates those functions to
avoid duplication.
Usage
defmodule MyConfig do
use AshPhoenixGenApi.Resource.EffectiveField
# ... struct and type definitions, unique functions, etc.
endGenerated Functions
The following effective_* functions are generated, each returning the
struct's field value when set, or the provided default when nil:
effective_timeout/2effective_response_type/2effective_request_info/2effective_check_permission/2effective_permission_callback/2effective_choose_node_mode/2effective_nodes/2effective_retry/2effective_version/2
Additionally, these shared helper functions are generated:
has_explicit_arg_types?/1has_explicit_arg_orders?/1enabled?/1