Skip to content

Commit

Permalink
rm mdoc:silent from sbt snippets as it does not compile on its own
Browse files Browse the repository at this point in the history
  • Loading branch information
hochgi committed Dec 26, 2024
1 parent 06da44d commit bbb76db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/reference/openapi-gen-sbt-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ The plugin offers 2 modes of operation that can be mixed and used together:
- Generating from managed dynamic OpenAPI spec files

in `project/plugins.sbt` add the following line:
```scala mdoc:silent
```scala
addSbtPlugin("dev.zio" % "zio-http-sbt-codegen" % "@VERSION@") // make sure the version of the sbt plugin
// matches the version of zio-http you are using
```

in `build.sbt` enable the plugin by adding:
```scala mdoc:silent
```scala
enablePlugins(ZioHttpCodegen)
```

Expand All @@ -34,7 +34,7 @@ or maybe you use services that expose OpenAPI specs via REST API, or perhaps you
Whatever the scenario you're dealing with, it can be very handy to dynamically fetch/generate the latest most updated spec file, so the generated code stays up to date with any changes introduced.

Here's how you can do it:
```scala mdoc:silent
```scala
import gigahorse.support.apachehttp.Gigahorse
import scala.concurrent.Await
import scala.concurrent.duration.DurationInt
Expand All @@ -61,7 +61,7 @@ ZIOpenApi / sourceGenerators += Def.task[Seq[File]] {

## Configuration
The plugin offers a setting key which you can set to control how code is generated:
```scala mdoc:silent
```scala
zioHttpCodegenConf := zio.http.gen.openapi.Config.default
```

Expand Down

0 comments on commit bbb76db

Please sign in to comment.