Skip to content

Commit

Permalink
scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
igneus committed Feb 27, 2025
1 parent 5aa9700 commit b5b4d04
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions zio-http-docs/src/main/scala/zio/http/docs/ConfigReference.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import zio.config.generateDocs
import zio._

object ConfigReference {
private type ObjectWithConfig = Object{def config: Config[Any]}
private type ObjectWithConfig = Object { def config: Config[Any] }

private val configs =
Seq[ObjectWithConfig](
Expand All @@ -19,17 +19,21 @@ object ConfigReference {
http.URL,
// http.ZClient.Config, // TODO: causes stack overflow
// http.gen.openapi.Config, // TODO
).map { obj => (
obj.getClass.getName.stripSuffix("$").replace("$", "."),
obj.config
) }
).map { obj =>
(
obj.getClass.getName.stripSuffix("$").replace("$", "."),
obj.config,
)
}

def build(): String = {
configs.map(item => {
val (name, config) = item
configs
.map(item => {
val (name, config) = item

s"# ${name}.config\n" +
generateDocs(config).toTable.toGithubFlavouredMarkdown
}).mkString("\n")
s"# ${name}.config\n" +
generateDocs(config).toTable.toGithubFlavouredMarkdown
})
.mkString("\n")
}
}

0 comments on commit b5b4d04

Please sign in to comment.