Skip to content

Commit

Permalink
Provide documentation for this new module
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrohdezma committed Sep 16, 2020
1 parent 661ee5d commit 38febab
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
17 changes: 17 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,23 @@ HttpRoutes.of[IO] {
}
```

##### Tapir

```scala
libraryDependencies += "com.47deg" %% "memeid4s-tapir" % "@VERSION@"
```

The [Tapir](https://tapir.softwaremill.com/en/latest/) integration provides implicit instances for `Codec[UUID]` and `Schema[UUID]`, which allow using `UUID` as
type for query/path params or headers in endpoints. As well as enriching documentation when a `UUID` field is used.

```scala mdoc:silent
import memeid4s.tapir.implicits._

import sttp.tapir._

endpoint.get.in("hello" / path[UUID])
```

##### Cats & Cats-effect

```scala
Expand Down
22 changes: 22 additions & 0 deletions microsite/docs/docs/memeid4s_tapir.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: docs
title: memeid4s-tapir
permalink: docs/memeid4s_tapir/
---

##### Tapir

```scala
libraryDependencies += "com.47deg" %% "memeid4s-tapir" % "@VERSION@"
```

The [Tapir](https://tapir.softwaremill.com/en/latest/) integration provides implicit instances for `Codec[UUID]` and `Schema[UUID]`, which allow using `UUID` as
type for query/path params or headers in endpoints. As well as enriching documentation when a `UUID` field is used.

```scala mdoc:silent
import memeid4s.tapir.implicits._

import sttp.tapir._

endpoint.get.in("hello" / path[UUID])
```
2 changes: 1 addition & 1 deletion microsite/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
layout: homeFeatures
features:
- first: ["RFC-compliant ", "memeid provides Time-based(v1), Random(v4), Namespaced(v3, v5) and Semi-sequential, random(SQUUID) UUID generation"]
- second: ["Third Party Integration", "memeid provides several modules that integrate with popular third-party libraries like Dobbie, Circe, Http4s and Cats."]
- second: ["Third Party Integration", "memeid provides several modules that integrate with popular third-party libraries like Dobbie, Circe, Http4s, Tapir and Cats."]
---
5 changes: 3 additions & 2 deletions microsite/src/main/resources/microsite/data/menu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
options:

- title: Quickstart
url: docs/

Expand All @@ -12,7 +11,9 @@ options:
url: docs/memeid4s_circe/
- title: Http4s
url: docs/memeid4s_http4s/
- title: Tapir
url: docs/memeid4s_tapir/
- title: Cats & Cats-effect
url: docs/memeid4s_cats/
- title: Scalacheck
url: docs/memeid4s_scalacheck/
url: docs/memeid4s_scalacheck/
11 changes: 6 additions & 5 deletions project/dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ object dependencies extends AutoPlugin {
)

private val documentation = Seq(
"org.typelevel" %% "cats-effect" % "2.2.0",
"io.circe" %% "circe-core" % "0.13.0",
"org.tpolecat" %% "doobie-h2" % "0.9.2",
"org.http4s" %% "http4s-dsl" % "0.21.7",
"org.scalacheck" %% "scalacheck" % "1.14.3"
"org.typelevel" %% "cats-effect" % "2.2.0",
"io.circe" %% "circe-core" % "0.13.0",
"org.tpolecat" %% "doobie-h2" % "0.9.2",
"org.http4s" %% "http4s-dsl" % "0.21.7",
"org.scalacheck" %% "scalacheck" % "1.14.3",
"com.softwaremill.sttp.tapir" %% "tapir-core" % "0.16.16"
)

override def trigger: PluginTrigger = allRequirements
Expand Down

0 comments on commit 38febab

Please sign in to comment.