zio / zio-config

Easily use and document any config from anywhere in ZIO apps
https://zio.dev/zio-config
Apache License 2.0
231 stars 112 forks source link

Expose ConfigDocs for public use? #1443

Closed tim-2022 closed 2 months ago

tim-2022 commented 2 months ago

Users should be allowed to generate non-table-based documentation. In order to do so it would be helpful to expose the ConfigDocs companion object in ConfigDocsModule (line 190) as public, rather than private[config].

tim-2022 commented 2 months ago

After some experimentation, it seems like ConfigDocs is a bit too far away from what we're trying to do to be useful. For example, a @describe attached to a root-level case class ends up, in documentation, on ALL of its ancestors, e.g. every string or boolean in its children or even its childrens' children, etc. (And I can't see a scenario in which that's sensible.)

So simply exposing this class isn't going to end up being useful; the whole modus operandi is alien to what I'd think a typical user might want or expect. (And I can't think of a simple way to fix it, without altering existing functionality.) Closing appropriately.