Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

The basics#

Sumit Rawal answered on May 24, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Please basics
  • Design Basics

  • The basics#

    0

    library assumes that you describe your API using the Endpoint type, which is more concretely defined as follows: Endpoint[I, E, O, S].

    • The type I defines the input given into the endpoint.

    • Type type E defines the error (or errors) that may be returned by the endpoint.

    • The type O defines the possible output of the endpoint.

    • The type S specifies the type of streams that are used for input and output.

    An endpoint can have attributes like name or description, which will be used in the generated documentation. You can also map input and output parameters into case classes.

    Please note that all mappings have to be bidirectional because tapir must be able to generate server and client code from it.

    Regarding the encoding and decoding of data, we will need our Circe codecs and additionally some schema definitions required by tapir. In concrete, we will need to define implicit SchemaFor[T] instances for each of our models.

    Tapir schema for Translation

    We will start with the Translation model.

    Popularity 1/10 Helpfulness 1/10 Language scala
    Source: Grepper
    Tags: scala
    Link to this answer
    Share Copy Link
    Contributed on May 24 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.