duct

walterl 2020-06-18T02:15:34.147300Z

I figured out a way to do it: by introducing an intermediate component :my.email/client, which is referenced by other components, and returns the component it is configured with. In the base profile it is configured with my.email/real-client, and in dev profile with my.email/dev-client.

walterl 2020-06-18T02:15:47.147500Z

This gist has more details: https://gist.github.com/walterl/70607e342ea8bf6cd3f0b5b4c97379c8

walterl 2020-06-18T02:16:39.147700Z

Is there maybe another/better way to achieve the same result?

2020-06-18T06:56:21.147900Z

@kevin.van.rooijen in the main thread is right; there’s no such mechanism. Instead you need to use dependencies between components to force an ordering…

{ :my/database { ,,, }
  :my/initialised-database { :db #ig/ref :my/database } 
   :my/app {:db #ig/ref :my/initialised-database}}

Jason Lee 2020-06-18T10:16:47.149Z

Does anyone know to how to setup swagger doc when using duct ?

kwrooijen 2020-06-18T10:17:10.149300Z

You'll probably want to use reitit, instead of ataraxy

Jason Lee 2020-06-18T10:17:59.150Z

you mean ataraxy is not working with swagger ?

kwrooijen 2020-06-18T10:18:23.150300Z

afaik ataraxy doesn't have swagger support

kwrooijen 2020-06-18T10:18:49.150700Z

Unless you set it up manually, but I don't have experience with that

kwrooijen 2020-06-18T10:19:05.151100Z

Reitit has built-in swagger support

Jason Lee 2020-06-18T10:19:48.151300Z

how about pedestal?

kwrooijen 2020-06-18T10:21:45.151900Z

Never used that, sorry. There is a duct module for it though https://github.com/lagenorhynque/duct.module.pedestal

Jason Lee 2020-06-18T10:28:28.152700Z

seems like duct template only support ataraxy router

kwrooijen 2020-06-18T10:29:11.153200Z

There is a duct reitit router: https://github.com/yannvanhalewyn/duct-reitit

Jason Lee 2020-06-18T10:29:57.153700Z

Thanks, I will give it a try