swiss_schema icon indicating copy to clipboard operation
swiss_schema copied to clipboard

Accept custom schema in `use SwissSchema` [Blocked]

Open joeljuca opened this issue 1 year ago • 6 comments

I've been thinking about making SwissSchema able to generate schema functions in other modules than the target schema itself. The use case is to allow it to be used in ctx modules.

Something like that:

# accounts.ex

defmodule MyApp.Accounts do
  use SwissSchema,
    schema: MyApp.Accounts.User
end

This way, SwissSchema could be used to replace generated ctx functions, resulting in cleaner ctx modules.

joeljuca avatar Sep 10 '23 20:09 joeljuca