Skip to content

Instantly share code, notes, and snippets.

@adamw
Created June 7, 2019 19:19
Show Gist options
  • Save adamw/98e97a0b2d9c3be71de8e6c04f1d48f2 to your computer and use it in GitHub Desktop.
Save adamw/98e97a0b2d9c3be71de8e6c04f1d48f2 to your computer and use it in GitHub Desktop.
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