Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. case class Pet(species: String, url: String)
  2. import tapir._
  3. import io.circe.generic.auto._
  4. import tapir.json.circe._
  5.  
  6. val petEndpoint: Endpoint[Int, String, Pet, Nothing] =
  7. endpoint
  8. .get
  9. .in("pet" / path[Int]("petId"))
  10. .errorOut(stringBody)
  11. .out(jsonBody[Pet])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement