Live Reloading

Live reloading can be use to automatically regenerate the swagger files and reload the swagger-ui when controller files change. To enable live reloading:

  • Ensure phoenix_swagger is added as a compiler in your mix.exs file
  • Add the path to the swagger JSON files and controllers to the endpoint live_reload config
  • Add the reloadable_compilers configuration to the endpoint config, including the :phoenix_swagger compiler
config :your_app, YourApp.Endpoint,
  live_reload: [
    patterns: [
  reloadable_compilers: [:gettext, :phoenix, :elixir, :phoenix_swagger]