swiss_schema
swiss_schema copied to clipboard
Accept custom schema in `use SwissSchema` [Blocked]
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.