Looking at this, I think you need to revisit your action basics before working on AshJsonApi. Actions don’t have “return values” (except for generic actions, but that is inside the run function) i.e that {:ok, "ok"} is not the return of the action (it just does nothing in fact, its evaluated at compile time).
The arguments also on their own don’t do anything, you need to do something with them like change set_attribute(:some_attr, arg(:some_arg)) (as an example).
The reason you are getting errors about those fields being required is because those attributes are themselves required, and your action is not doing anything to set them:
attribute :creditos_disponibles, :integer do
allow_nil? false
default 0
public? true
end
attribute :vigencia, :datetime do
allow_nil? false
public? true
end






















