Last active
May 18, 2020 08:29
-
-
Save adamw/7e5103730eb5c64fa6e87f97c49d584e 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 User(id: UUID, name: String) | |
case class Pet(id: UUID, kind: String, name: String) | |
val getPet: Endpoint[(AuthToken, UUID), Error, Pet, Nothing] = | |
baseEndpoint | |
.get | |
.in(query[UUID]("id").description("The id of the pet to find")) | |
.out(jsonBody[Pet]) | |
.description("Finds a pet by id") | |
val addPet: Endpoint[(AuthToken, Pet), Error, Unit, Nothing] = | |
baseEndpoint | |
.post | |
.in(jsonBody[Pet]) | |
.description("Adds a pet") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment