Format is further used in Table
which is used for config documentation.
Format is further used in Table
which is used for config documentation. Format helps the readers of the documentation understand the details of the format
of each paths that forms their application config.
Example: A format can be List
, Map
, Primitive
, or it can even be even more complex such as AllOf
or AnyOneOf
.
If Format
of paths K
is AllOf
, it implies that there are more distinct paths under the paths K
, and user need to satisfy (i.e, provide them in the source)
all of the paths under K
.
If Format
of paths K
is AnyOneOf
, it implies there are more distinct paths under the paths K
, then user need to satisfy (i.e, provide them in the source)
any one of the paths under K
.
If Format
of oaths K
is Recursion
then that means there is a repetition of same path structure under the paths K
A TableRow
represents each row in a Table
which is an intermediate light-weight structure produced from ConfigDocs
.
A TableRow
represents each row in a Table
which is an intermediate light-weight structure produced from ConfigDocs
.
Table
is more easier to be converted to formats such as Json, markdown or any custom format fo your choice.
: Each config key is basically a list of paths representing its hierarchy. Example: "aws.ec2.instance.type" where list of paths is List("aws", "ec2", "instance", "type")
: The format of value of key (paths). Example: it can be a Primitive type (String, Int etc), or it can be complex structures as such as List or Map.
: Description (zio-config in-built or user-provided) of the key (paths).
: A TableRow
can be pointed to a nested table that has the details of all the child paths that are under paths
. Hence TableRow
is a recursive structure.
Internal function that represents the creation of a github flavoured markdown.
Internal function that represents the creation of a github flavoured markdown. The implementation can be used as reference for users
who would like to produce a different style markdown rendering by specifying
how to create Link
given a Heading
, Int
representing the index of the key (or paths) and Either[FieldName, Format]
.
The index exists because it represents the index of a heading (which is the individual key of paths) in markdown. This is usually zero for all headings unless
there are duplicate headings in the markdown. There is a possibility of duplicate headings in the markdown, if for instance,
given a path x.y
and k.y
, the heading y
can appear twice in the markdown file with indices as 0 and 1. Depending on the flavour of markdown (Example: Github, Confluence)
we have different ways to produce links towards those headings. In this case, we employ the strategy used by Github.