Created
June 7, 2019 19:19
-
-
Save adamw/98e97a0b2d9c3be71de8e6c04f1d48f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Pet(species: String, url: String) | |
import tapir._ | |
import io.circe.generic.auto._ | |
import tapir.json.circe._ | |
val petEndpoint: Endpoint[Int, String, Pet, Nothing] = | |
endpoint | |
.get | |
.in("pet" / path[Int]("petId")) | |
.errorOut(stringBody) | |
.out(jsonBody[Pet]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment