Skip to content

No more static ⚡schemas path

Compare
Choose a tag to compare
@Strech Strech released this 24 Jun 22:11
· 44 commits to master since this release
c5a7ccd

In this release, few changes were done to the Avrora.Config.

The main change is about releases and schemas_path configuration. Especially if you have multiple apps in Umbrella and would like to have per-app schemas_path, now you can pass an otp_app option which should point to your OPT application which will be used to compute the root path for the schemas_path in a runtime.

# Private client
defmodule MyClient do
  use Avrora.Client,
    otp_app: :my_application,
    schemas_path: "./some/path/to/schemas"
end

# Shared client
config :avrora,
  otp_app: :my_application,
  schemas_path: "./some/path/to/schemas"

And as a side-effect, now all the schemas_path which is without otp_app set, will be resolved with Path.expand

Many thanks to @LostKobrakai for support 💚