c

sttp.tapir

Endpoint

case class Endpoint[I, E, O, -R](input: EndpointInput[I], errorOutput: EndpointOutput[E], output: EndpointOutput[O], info: EndpointInfo) extends EndpointInputsOps[I, E, O, R] with EndpointErrorOutputsOps[I, E, O, R] with EndpointOutputsOps[I, E, O, R] with EndpointInfoOps[I, E, O, R] with EndpointMetaOps[I, E, O, R] with EndpointServerLogicOps[I, E, O, R] with Product with Serializable

I

Input parameter types.

E

Error output parameter types.

O

Output parameter types.

R

The capabilities that are required by this endpoint's inputs/outputs. This might be Any (no requirements), sttp.capabilities.Effect (the interpreter must support the given effect type), sttp.capabilities.Streams (the ability to send and receive streaming bodies) or sttp.capabilities.WebSockets (the ability to handle websocket requests).

Self Type
Endpoint[I, E, O, R]
Linear Supertypes
Serializable, Product, Equals, EndpointServerLogicOps[I, E, O, R], EndpointMetaOps[I, E, O, R], EndpointInfoOps[I, E, O, R], EndpointOutputsOps[I, E, O, R], EndpointOutputsMacros[I, E, O, R], EndpointErrorOutputsOps[I, E, O, R], EndpointErrorOutputsMacros[I, E, O, R], EndpointInputsOps[I, E, O, R], EndpointInputsMacros[I, E, O, R], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Endpoint
  2. Serializable
  3. Product
  4. Equals
  5. EndpointServerLogicOps
  6. EndpointMetaOps
  7. EndpointInfoOps
  8. EndpointOutputsOps
  9. EndpointOutputsMacros
  10. EndpointErrorOutputsOps
  11. EndpointErrorOutputsMacros
  12. EndpointInputsOps
  13. EndpointInputsMacros
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Endpoint(input: EndpointInput[I], errorOutput: EndpointOutput[E], output: EndpointOutput[O], info: EndpointInfo)

Type Members

  1. type EndpointType[_I, _E, _O, -_R] = Endpoint[_I, _E, _O, _R]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def additionalInputsForShow: Vector[Basic[_]]
    Attributes
    protected
    Definition Classes
    EndpointMetaOps
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def connect: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  8. def delete: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  9. def deprecated(): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  10. def description(d: String): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  11. def docsExtension[A](key: String, value: A)(implicit arg0: JsonCodec[A]): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def errorOut[F, EF](i: EndpointOutput[F])(implicit ts: typelevel.ParamConcat.Aux[E, F, EF]): EndpointType[I, EF, O, R]
    Definition Classes
    EndpointErrorOutputsOps
  14. val errorOutput: EndpointOutput[E]
  15. def get: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def head: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  18. def httpMethod: Option[Method]
    Definition Classes
    EndpointInputsOps
  19. def in[BS, J, IJ, R2](i: StreamBodyIO[BS, J, R2])(implicit concat: typelevel.ParamConcat.Aux[I, J, IJ]): EndpointType[IJ, E, O, R with R2]
    Definition Classes
    EndpointInputsOps
  20. def in[J, IJ](i: EndpointInput[J])(implicit concat: typelevel.ParamConcat.Aux[I, J, IJ]): EndpointType[IJ, E, O, R]
    Definition Classes
    EndpointInputsOps
  21. def info(i: EndpointInfo): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  22. val info: EndpointInfo
    Definition Classes
    EndpointEndpointMetaOpsEndpointInfoOps
  23. val input: EndpointInput[I]
    Definition Classes
    EndpointEndpointMetaOpsEndpointInputsOps
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def mapErrorOut[EE](f: (E) => EE)(g: (EE) => E): EndpointType[I, EE, O, R]
    Definition Classes
    EndpointErrorOutputsOps
  26. def mapErrorOut[EE](m: Mapping[E, EE]): EndpointType[I, EE, O, R]
    Definition Classes
    EndpointErrorOutputsOps
  27. def mapErrorOutDecode[EE](f: (E) => DecodeResult[EE])(g: (EE) => E): EndpointType[I, EE, O, R]
    Definition Classes
    EndpointErrorOutputsOps
  28. macro def mapErrorOutTo[CASE_CLASS]: EndpointType[I, CASE_CLASS, O, R]
    Definition Classes
    EndpointErrorOutputsMacros
  29. def mapIn[II](f: (I) => II)(g: (II) => I): EndpointType[II, E, O, R]
    Definition Classes
    EndpointInputsOps
  30. def mapIn[II](m: Mapping[I, II]): EndpointType[II, E, O, R]
    Definition Classes
    EndpointInputsOps
  31. def mapInDecode[II](f: (I) => DecodeResult[II])(g: (II) => I): EndpointType[II, E, O, R]
    Definition Classes
    EndpointInputsOps
  32. macro def mapInTo[CASE_CLASS]: EndpointType[CASE_CLASS, E, O, R]
    Definition Classes
    EndpointInputsMacros
  33. def mapOut[OO](f: (O) => OO)(g: (OO) => O): EndpointType[I, E, OO, R]
    Definition Classes
    EndpointOutputsOps
  34. def mapOut[OO](m: Mapping[O, OO]): EndpointType[I, E, OO, R]
    Definition Classes
    EndpointOutputsOps
  35. def mapOutDecode[OO](f: (O) => DecodeResult[OO])(g: (OO) => O): EndpointType[I, E, OO, R]
    Definition Classes
    EndpointOutputsOps
  36. macro def mapOutTo[CASE_CLASS]: EndpointType[I, E, CASE_CLASS, R]
    Definition Classes
    EndpointOutputsMacros
  37. def method(m: Method): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  38. def name(n: String): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  42. def options: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  43. def out[PIPE_REQ_RESP, P, OP, R2](i: WebSocketBodyOutput[PIPE_REQ_RESP, _, _, P, R2])(implicit ts: typelevel.ParamConcat.Aux[O, P, OP]): EndpointType[I, E, OP, R with R2 with WebSockets]
    Definition Classes
    EndpointOutputsOps
  44. def out[BS, P, OP, R2](i: StreamBodyIO[BS, P, R2])(implicit ts: typelevel.ParamConcat.Aux[O, P, OP]): EndpointType[I, E, OP, R with R2]
    Definition Classes
    EndpointOutputsOps
  45. def out[P, OP](i: EndpointOutput[P])(implicit ts: typelevel.ParamConcat.Aux[O, P, OP]): EndpointType[I, E, OP, R]
    Definition Classes
    EndpointOutputsOps
  46. val output: EndpointOutput[O]
    Definition Classes
    EndpointEndpointMetaOpsEndpointOutputsOps
  47. def patch: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  48. def post: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  49. def prependErrorOut[F, FE](i: EndpointOutput[F])(implicit ts: typelevel.ParamConcat.Aux[F, E, FE]): EndpointType[I, FE, O, R]
    Definition Classes
    EndpointErrorOutputsOps
  50. def prependIn[BS, J, JI, R2](i: StreamBodyIO[BS, J, R2])(implicit concat: typelevel.ParamConcat.Aux[J, I, JI]): EndpointType[JI, E, O, R with R2]
    Definition Classes
    EndpointInputsOps
  51. def prependIn[J, JI](i: EndpointInput[J])(implicit concat: typelevel.ParamConcat.Aux[J, I, JI]): EndpointType[JI, E, O, R]
    Definition Classes
    EndpointInputsOps
  52. def prependOut[PIPE_REQ_RESP, P, PO, R2](i: WebSocketBodyOutput[PIPE_REQ_RESP, _, _, P, R2])(implicit ts: typelevel.ParamConcat.Aux[P, O, PO]): EndpointType[I, E, PO, R with R2 with WebSockets]
    Definition Classes
    EndpointOutputsOps
  53. def prependOut[BS, P, PO, R2](i: StreamBodyIO[BS, P, R2])(implicit ts: typelevel.ParamConcat.Aux[P, O, PO]): EndpointType[I, E, PO, R]
    Definition Classes
    EndpointOutputsOps
  54. def prependOut[P, PO](i: EndpointOutput[P])(implicit ts: typelevel.ParamConcat.Aux[P, O, PO]): EndpointType[I, E, PO, R]
    Definition Classes
    EndpointOutputsOps
  55. def productElementNames: Iterator[String]
    Definition Classes
    Product
  56. def put: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  57. def renderPathTemplate(renderPathParam: RenderPathParam = RenderPathTemplate.Defaults.path, renderQueryParam: Option[RenderQueryParam] = Some(RenderPathTemplate.Defaults.query), includeAuth: Boolean = true): String

    Renders endpoint path, by default all parametrised path and query components are replaced by {param_name} or {paramN}, e.g.

    Renders endpoint path, by default all parametrised path and query components are replaced by {param_name} or {paramN}, e.g. for

    endpoint.in("p1" / path[String] / query[String]("par2"))

    returns /p1/{param1}?par2={par2}

    includeAuth

    Should authentication inputs be included in the result.

    Definition Classes
    EndpointMetaOps
  58. def serverLogic[F[_]](f: (I) => F[Either[E, O]]): ServerEndpoint[I, E, O, R, F]

    Combine this endpoint description with a function, which implements the server-side logic.

    Combine this endpoint description with a function, which implements the server-side logic. The logic returns a result, which is either an error or a successful output, wrapped in an effect type F.

    A server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).

    Both the endpoint and logic function are considered complete, and cannot be later extended through the returned ServerEndpoint value (except for endpoint meta-data). To provide the logic in parts, see serverLogicPart and serverLogicForCurrent.

    Definition Classes
    EndpointServerLogicOps
  59. def serverLogicForCurrent[U, F[_]](f: (I) => F[Either[E, U]]): PartialServerEndpoint[I, U, Unit, E, O, R, F]

    Combine this endpoint description with a function, which implements a part of the server-side logic, for the entire input defined so far.

    Combine this endpoint description with a function, which implements a part of the server-side logic, for the entire input defined so far. The partial logic returns a result, which is either an error or a success value, wrapped in an effect type F.

    Subsequently, the endpoint inputs and outputs can be extended (but not error outputs!). Then, either further parts of the server logic can be provided (again, consuming the whole input defined so far). Or, the entire remaining server logic can be provided, given a function which accepts as arguments the results of applying the part-functions, and the remaining input. The final result is then a ServerEndpoint.

    A complete server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).

    When using this method, each logic part consumes the whole input defined so far. To provide the server logic in parts, where only part of the input is consumed (but the endpoint cannot be later extended), see the serverLogicPart function.

    An example use-case is defining an endpoint with fully-defined errors, and with authorization logic built-in. Such an endpoint can be then extended by multiple other endpoints.

    Definition Classes
    EndpointServerLogicOps
  60. def serverLogicForCurrentRecoverErrors[U, F[_]](f: (I) => F[U])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E]): PartialServerEndpoint[I, U, Unit, E, O, R, F]

    Same as serverLogicForCurrent, but requires E to be a throwable, and coverts failed effects of type E to endpoint errors.

    Same as serverLogicForCurrent, but requires E to be a throwable, and coverts failed effects of type E to endpoint errors.

    Definition Classes
    EndpointServerLogicOps
  61. def serverLogicPart[T, IR, U, F[_]](f: (T) => F[Either[E, U]])(implicit iMinusT: typelevel.ParamSubtract.Aux[I, T, IR]): ServerEndpointInParts[U, IR, I, E, O, R, F]

    Combine this endpoint description with a function, which implements a part of the server-side logic.

    Combine this endpoint description with a function, which implements a part of the server-side logic. The partial logic returns a result, which is either an error or a success value, wrapped in an effect type F.

    Subsequent parts of the logic can be provided later using ServerEndpointInParts.andThenPart, consuming successive input parts. Finally, the logic can be completed, given a function which accepts as arguments the results of applying on part-functions, and the remaining input. The final result is then a ServerEndpoint.

    A complete server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).

    When using this method, the endpoint description is considered complete, and cannot be later extended through the returned ServerEndpointInParts value. However, each part of the server logic can consume only a part of the input. To provide the logic in parts, while still being able to extend the endpoint description, see serverLogicForCurrent.

    An example use-case is providing authorization logic, followed by server logic (using an authorized user), given a complete endpoint description.

    Note that the type of the f partial server logic function cannot be inferred, it must be explicitly given (e.g. by providing a function or method value).

    Definition Classes
    EndpointServerLogicOps
  62. def serverLogicPartRecoverErrors[T, IR, U, F[_]](f: (T) => F[U])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E], iMinusR: typelevel.ParamSubtract.Aux[I, T, IR]): ServerEndpointInParts[U, IR, I, E, O, R, F]

    Same as serverLogicPart, but requires E to be a throwable, and coverts failed effects of type E to endpoint errors.

    Same as serverLogicPart, but requires E to be a throwable, and coverts failed effects of type E to endpoint errors.

    Definition Classes
    EndpointServerLogicOps
  63. def serverLogicRecoverErrors[F[_]](f: (I) => F[O])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E]): ServerEndpoint[I, E, O, R, F]

    Same as serverLogic, but requires E to be a throwable, and coverts failed effects of type E to endpoint errors.

    Same as serverLogic, but requires E to be a throwable, and coverts failed effects of type E to endpoint errors.

    Definition Classes
    EndpointServerLogicOps
  64. def show: String

    Basic information about the endpoint, excluding mapping information, with inputs sorted (first the method, then path, etc.)

    Basic information about the endpoint, excluding mapping information, with inputs sorted (first the method, then path, etc.)

    Definition Classes
    EndpointMetaOps
  65. def showDetail: String

    Detailed description of the endpoint, with inputs/outputs represented in the same order as originally defined, including mapping information.

    Detailed description of the endpoint, with inputs/outputs represented in the same order as originally defined, including mapping information.

    Definition Classes
    EndpointMetaOps
  66. def showRaw: String

    Equivalent to .toString, shows the whole case class structure.

    Equivalent to .toString, shows the whole case class structure.

    Definition Classes
    EndpointMetaOps
  67. def showType: String
    Attributes
    protected
    Definition Classes
    EndpointEndpointMetaOps
  68. def summary(s: String): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  69. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  70. def tag(t: String): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  71. def tags(ts: List[String]): EndpointType[I, E, O, R]
    Definition Classes
    EndpointInfoOps
  72. def trace: EndpointType[I, E, O, R]
    Definition Classes
    EndpointInputsOps
  73. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  74. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  75. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from EndpointServerLogicOps[I, E, O, R]

Inherited from EndpointMetaOps[I, E, O, R]

Inherited from EndpointInfoOps[I, E, O, R]

Inherited from EndpointOutputsOps[I, E, O, R]

Inherited from EndpointOutputsMacros[I, E, O, R]

Inherited from EndpointErrorOutputsOps[I, E, O, R]

Inherited from EndpointErrorOutputsMacros[I, E, O, R]

Inherited from EndpointInputsOps[I, E, O, R]

Inherited from EndpointInputsMacros[I, E, O, R]

Inherited from AnyRef

Inherited from Any

Ungrouped