c

sttp.tapir

Endpoint

case class Endpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, -R](securityInput: EndpointInput[SECURITY_INPUT], input: EndpointInput[INPUT], errorOutput: EndpointOutput[ERROR_OUTPUT], output: EndpointOutput[OUTPUT], info: EndpointInfo) extends EndpointSecurityInputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R] with EndpointInputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R] with EndpointErrorOutputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R] with EndpointErrorOutputVariantsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R] with EndpointOutputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R] with EndpointInfoOps[R] with EndpointMetaOps with EndpointServerLogicOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R] with Product with Serializable

A description of an endpoint with the given inputs & outputs. The inputs are divided into two parts: security (A) and regular inputs (I). There are also two kinds of outputs: error outputs (E) and regular outputs (O).

In case there are no security inputs, the PublicEndpoint alias can be used, which omits the A parameter type.

An endpoint can be interpreted as a server, client or documentation. The endpoint requires that server/client interpreters meet the capabilities specified by R (if any).

When interpreting an endpoint as a server, the inputs are decoded and the security logic is run first, before decoding the body in the regular inputs. This allows short-circuiting further processing in case security checks fail. Server logic can be provided using EndpointServerLogicOps.serverSecurityLogic variants for secure endpoints, and EndpointServerLogicOps.serverLogic variants for public endpoints.

A concise description of an endpoint can be generated using the EndpointMetaOps.show method.

SECURITY_INPUT

Security input parameter types, abbreviated as A.

INPUT

Input parameter types, abbreviated as I.

ERROR_OUTPUT

Error output parameter types, abbreviated as E.

OUTPUT

Output parameter types, abbreviated as O.

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[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
Linear Supertypes
Serializable, Serializable, Product, Equals, EndpointServerLogicOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointMetaOps, EndpointInfoOps[R], EndpointOutputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointOutputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointErrorOutputVariantsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointErrorOutputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointErrorOutputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointInputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointInputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointSecurityInputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], EndpointSecurityInputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Endpoint
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. EndpointServerLogicOps
  7. EndpointMetaOps
  8. EndpointInfoOps
  9. EndpointOutputsOps
  10. EndpointOutputsMacros
  11. EndpointErrorOutputVariantsOps
  12. EndpointErrorOutputsOps
  13. EndpointErrorOutputsMacros
  14. EndpointInputsOps
  15. EndpointInputsMacros
  16. EndpointSecurityInputsOps
  17. EndpointSecurityInputsMacros
  18. AnyRef
  19. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Endpoint(securityInput: EndpointInput[SECURITY_INPUT], input: EndpointInput[INPUT], errorOutput: EndpointOutput[ERROR_OUTPUT], output: EndpointOutput[OUTPUT], info: EndpointInfo)

Type Members

  1. type EndpointType[_A, _I, _E, _O, -_R] = Endpoint[_A, _I, _E, _O, _R]
  2. type ThisType[-_R] = Endpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, _R]
    Definition Classes
    EndpointEndpointInfoOps

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def attribute[T](k: AttributeKey[T], v: T): ThisType[R]
    Definition Classes
    EndpointInfoOps
  6. def attribute[T](k: AttributeKey[T]): Option[T]
    Definition Classes
    EndpointInfoOps
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. def connect: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  9. def delete: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  10. def deprecated(): ThisType[R]
    Definition Classes
    EndpointInfoOps
  11. def description(d: String): ThisType[R]
    Definition Classes
    EndpointInfoOps
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def errorOut[F, EF](o: EndpointOutput[F])(implicit ts: typelevel.ParamConcat.Aux[ERROR_OUTPUT, F, EF]): EndpointType[SECURITY_INPUT, INPUT, EF, OUTPUT, R]
    Definition Classes
    EndpointErrorOutputsOps
  14. def errorOutEither[E2](o: EndpointOutput[E2]): EndpointType[SECURITY_INPUT, INPUT, Either[ERROR_OUTPUT, E2], OUTPUT, R]

    Adds a new error variant, where the current error output is represented as a Left, and the given one as a Right.

    Adds a new error variant, where the current error output is represented as a Left, and the given one as a Right.

    Definition Classes
    EndpointErrorOutputVariantsOps
  15. def errorOutVariant[E2 >: ERROR_OUTPUT](o: OneOfVariant[_ <: E2])(implicit ct: ClassTag[ERROR_OUTPUT], eEqualToErasure: ErasureSameAsType[ERROR_OUTPUT]): EndpointType[SECURITY_INPUT, INPUT, E2, OUTPUT, R]

    Replaces the current error output with a Tapir.oneOf output, where:

    Replaces the current error output with a Tapir.oneOf output, where:

    • the first output variant is the current output: oneOfVariant(errorOutput)
    • the second output variant is the given o

    The variant for the current endpoint output will be created using Tapir.oneOfVariant. Hence, the current output will be used if the run-time class of the output matches E. If the erasure of the E type is different from E, there will be a compile-time failure, as no such run-time check is possible. In this case, use errorOutVariantsFromCurrent and create a variant using one of the other variant factory methods (e.g. Tapir.oneOfVariantValueMatcher).

    During encoding/decoding, the new o variant will be considered after the current variant.

    Usage example:

    sealed trait Parent
    case class Child1(v: String) extends Parent
    case class Child2(v: String) extends Parent
    
    val e: PublicEndpoint[Unit, Parent, Unit, Any] = endpoint
      .errorOut(stringBody.mapTo[Child1])
      .errorOutVariant[Parent](oneOfVariant(stringBody.mapTo[Child2]))

    Adding error output variants is useful when extending the error outputs in a PartialServerEndpoint, created using EndpointServerLogicOps.serverSecurityLogic.

    E2

    A common supertype of the new variant and the current output E.

    o

    The variant to add. Can be created given an output with one of the Tapir.oneOfVariant methods.

    Definition Classes
    EndpointErrorOutputVariantsOps
  16. def errorOutVariantPrepend[E2 >: ERROR_OUTPUT](o: OneOfVariant[_ <: E2]): EndpointType[SECURITY_INPUT, INPUT, E2, OUTPUT, R]

    Replaces the current error output with a Tapir.oneOf output, where:

    Replaces the current error output with a Tapir.oneOf output, where:

    • the first output variant is the given o
    • the second, default output variant is the current output: oneOfDefaultVariant(errorOutput)

    Useful for adding specific error variants, while the more general ones are already covered by the existing error output.

    During encoding/decoding, the new o variant will be considered before the current variant.

    Adding error output variants is useful when extending the error outputs in a PartialServerEndpoint, created using EndpointServerLogicOps.serverSecurityLogic.

    E2

    A common supertype of the new variant and the current output E.

    o

    The variant to add. Can be created given an output with one of the Tapir.oneOfVariant methods.

    Definition Classes
    EndpointErrorOutputVariantsOps
  17. def errorOutVariants[E2 >: ERROR_OUTPUT](first: OneOfVariant[_ <: E2], other: OneOfVariant[_ <: E2]*)(implicit ct: ClassTag[ERROR_OUTPUT], eEqualToErasure: ErasureSameAsType[ERROR_OUTPUT]): EndpointType[SECURITY_INPUT, INPUT, E2, OUTPUT, R]

    Same as errorOutVariant, but allows appending multiple variants in one go.

    Same as errorOutVariant, but allows appending multiple variants in one go.

    Definition Classes
    EndpointErrorOutputVariantsOps
  18. def errorOutVariantsFromCurrent[E2 >: ERROR_OUTPUT](variants: (EndpointOutput[ERROR_OUTPUT]) ⇒ List[OneOfVariant[_ <: E2]]): EndpointType[SECURITY_INPUT, INPUT, E2, OUTPUT, R]

    Replace the error output with a Tapir.oneOf output, using the variants returned by variants.

    Replace the error output with a Tapir.oneOf output, using the variants returned by variants. The current output should be included in one of the returned variants.

    Allows creating the variant list in a custom order, placing the current variant in an arbitrary position, and using default variants if necessary.

    Adding error output variants is useful when extending the error outputs in a PartialServerEndpoint, created using EndpointServerLogicOps.serverSecurityLogic.

    E2

    A common supertype of the new variant and the current output E.

    Definition Classes
    EndpointErrorOutputVariantsOps
  19. val errorOutput: EndpointOutput[ERROR_OUTPUT]
  20. def get: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def head: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  23. def in[BS, J, IJ, R2](i: StreamBodyIO[BS, J, R2])(implicit concat: typelevel.ParamConcat.Aux[INPUT, J, IJ]): EndpointType[SECURITY_INPUT, IJ, ERROR_OUTPUT, OUTPUT, R with R2]
    Definition Classes
    EndpointInputsOps
  24. def in[J, IJ](i: EndpointInput[J])(implicit concat: typelevel.ParamConcat.Aux[INPUT, J, IJ]): EndpointType[SECURITY_INPUT, IJ, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  25. def info(i: EndpointInfo): ThisType[R]
    Definition Classes
    EndpointInfoOps
  26. val info: EndpointInfo
    Definition Classes
    EndpointEndpointMetaOpsEndpointInfoOps
  27. val input: EndpointInput[INPUT]
    Definition Classes
    EndpointEndpointMetaOpsEndpointInputsOps
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. def mapErrorOut[EE](f: (ERROR_OUTPUT) ⇒ EE)(g: (EE) ⇒ ERROR_OUTPUT): EndpointType[SECURITY_INPUT, INPUT, EE, OUTPUT, R]
  30. def mapErrorOut[EE](m: Mapping[ERROR_OUTPUT, EE]): EndpointType[SECURITY_INPUT, INPUT, EE, OUTPUT, R]
    Definition Classes
    EndpointErrorOutputsOps
  31. def mapErrorOutDecode[EE](f: (ERROR_OUTPUT) ⇒ DecodeResult[EE])(g: (EE) ⇒ ERROR_OUTPUT): EndpointType[SECURITY_INPUT, INPUT, EE, OUTPUT, R]
    Definition Classes
    EndpointErrorOutputsOps
  32. macro def mapErrorOutTo[CASE_CLASS]: EndpointType[SECURITY_INPUT, INPUT, CASE_CLASS, OUTPUT, R]
    Definition Classes
    EndpointErrorOutputsMacros
  33. def mapIn[II](f: (INPUT) ⇒ II)(g: (II) ⇒ INPUT): EndpointType[SECURITY_INPUT, II, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  34. def mapIn[II](m: Mapping[INPUT, II]): EndpointType[SECURITY_INPUT, II, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  35. def mapInDecode[II](f: (INPUT) ⇒ DecodeResult[II])(g: (II) ⇒ INPUT): EndpointType[SECURITY_INPUT, II, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  36. macro def mapInTo[CASE_CLASS]: EndpointType[SECURITY_INPUT, CASE_CLASS, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsMacros
  37. def mapOut[OO](f: (OUTPUT) ⇒ OO)(g: (OO) ⇒ OUTPUT): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OO, R]
    Definition Classes
    EndpointOutputsOps
  38. def mapOut[OO](m: Mapping[OUTPUT, OO]): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OO, R]
    Definition Classes
    EndpointOutputsOps
  39. def mapOutDecode[OO](f: (OUTPUT) ⇒ DecodeResult[OO])(g: (OO) ⇒ OUTPUT): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OO, R]
    Definition Classes
    EndpointOutputsOps
  40. macro def mapOutTo[CASE_CLASS]: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, CASE_CLASS, R]
    Definition Classes
    EndpointOutputsMacros
  41. def mapSecurityIn[AA](f: (SECURITY_INPUT) ⇒ AA)(g: (AA) ⇒ SECURITY_INPUT): EndpointType[AA, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointSecurityInputsOps
  42. def mapSecurityIn[AA](m: Mapping[SECURITY_INPUT, AA]): EndpointType[AA, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointSecurityInputsOps
  43. def mapSecurityInDecode[AA](f: (SECURITY_INPUT) ⇒ DecodeResult[AA])(g: (AA) ⇒ SECURITY_INPUT): EndpointType[AA, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointSecurityInputsOps
  44. macro def mapSecurityInTo[CASE_CLASS]: EndpointType[CASE_CLASS, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointSecurityInputsMacros
  45. def method: Option[Method]

    The method defined in a fixed method input in this endpoint, if any (using e.g.

    The method defined in a fixed method input in this endpoint, if any (using e.g. EndpointInputsOps.get or EndpointInputsOps.post).

    Definition Classes
    EndpointMetaOps
  46. def method(m: Method): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  47. def name(n: String): ThisType[R]
    Definition Classes
    EndpointInfoOps
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  50. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  51. def options: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  52. def out[PIPE_REQ_RESP, P, OP, R2](i: WebSocketBodyOutput[PIPE_REQ_RESP, _, _, P, R2])(implicit ts: typelevel.ParamConcat.Aux[OUTPUT, P, OP]): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OP, R with R2 with WebSockets]
    Definition Classes
    EndpointOutputsOps
  53. def out[BS, P, OP, R2](i: StreamBodyIO[BS, P, R2])(implicit ts: typelevel.ParamConcat.Aux[OUTPUT, P, OP]): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OP, R with R2]
    Definition Classes
    EndpointOutputsOps
  54. def out[P, OP](i: EndpointOutput[P])(implicit ts: typelevel.ParamConcat.Aux[OUTPUT, P, OP]): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OP, R]
    Definition Classes
    EndpointOutputsOps
  55. val output: EndpointOutput[OUTPUT]
    Definition Classes
    EndpointEndpointMetaOpsEndpointOutputsOps
  56. def patch: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  57. def post: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  58. def prependErrorOut[F, FE](o: EndpointOutput[F])(implicit ts: typelevel.ParamConcat.Aux[F, ERROR_OUTPUT, FE]): EndpointType[SECURITY_INPUT, INPUT, FE, OUTPUT, R]
    Definition Classes
    EndpointErrorOutputsOps
  59. def prependIn[BS, J, JI, R2](i: StreamBodyIO[BS, J, R2])(implicit concat: typelevel.ParamConcat.Aux[J, INPUT, JI]): EndpointType[SECURITY_INPUT, JI, ERROR_OUTPUT, OUTPUT, R with R2]
    Definition Classes
    EndpointInputsOps
  60. def prependIn[J, JI](i: EndpointInput[J])(implicit concat: typelevel.ParamConcat.Aux[J, INPUT, JI]): EndpointType[SECURITY_INPUT, JI, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  61. def prependOut[PIPE_REQ_RESP, P, PO, R2](i: WebSocketBodyOutput[PIPE_REQ_RESP, _, _, P, R2])(implicit ts: typelevel.ParamConcat.Aux[P, OUTPUT, PO]): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, PO, R with R2 with WebSockets]
    Definition Classes
    EndpointOutputsOps
  62. def prependOut[BS, P, PO, R2](i: StreamBodyIO[BS, P, R2])(implicit ts: typelevel.ParamConcat.Aux[P, OUTPUT, PO]): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, PO, R with R2]
    Definition Classes
    EndpointOutputsOps
  63. def prependOut[P, PO](i: EndpointOutput[P])(implicit ts: typelevel.ParamConcat.Aux[P, OUTPUT, PO]): EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, PO, R]
    Definition Classes
    EndpointOutputsOps
  64. def prependSecurityIn[B, BA](i: EndpointInput[B])(implicit concat: typelevel.ParamConcat.Aux[B, SECURITY_INPUT, BA]): EndpointType[BA, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointSecurityInputsOps
  65. def put: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  66. def securityIn[B, AB](i: EndpointInput[B])(implicit concat: typelevel.ParamConcat.Aux[SECURITY_INPUT, B, AB]): EndpointType[AB, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointSecurityInputsOps
  67. val securityInput: EndpointInput[SECURITY_INPUT]
  68. def serverLogic[F[_]](f: (INPUT) ⇒ F[Either[ERROR_OUTPUT, OUTPUT]])(implicit aIsUnit: =:=[SECURITY_INPUT, Unit]): Full[Unit, Unit, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

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

    Combine this public 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. For secure endpoints, use serverSecurityLogic.

    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). Secure endpoints allow providing the security logic before all the inputs and outputs are specified.

    Definition Classes
    EndpointServerLogicOps
  69. def serverLogicError[F[_]](f: (INPUT) ⇒ F[ERROR_OUTPUT])(implicit aIsUnit: =:=[SECURITY_INPUT, Unit]): Full[Unit, Unit, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

    Like serverLogic, but specialised to the case when the result is always an error (Left), hence when the logic type can be simplified to I => F[E].

    Like serverLogic, but specialised to the case when the result is always an error (Left), hence when the logic type can be simplified to I => F[E].

    Definition Classes
    EndpointServerLogicOps
  70. def serverLogicOption[F[_]](f: (INPUT) ⇒ F[Option[OUTPUT]])(implicit aIsUnit: =:=[SECURITY_INPUT, Unit], eIsUnit: =:=[ERROR_OUTPUT, Unit]): Full[Unit, Unit, INPUT, Unit, OUTPUT, R, F]

    Like serverLogic, but specialised to the case when the error type is Unit (e.g.

    Like serverLogic, but specialised to the case when the error type is Unit (e.g. a fixed status code), and the result of the logic function is an option. A None is then treated as an error response.

    Definition Classes
    EndpointServerLogicOps
  71. def serverLogicPure[F[_]](f: (INPUT) ⇒ Either[ERROR_OUTPUT, OUTPUT])(implicit aIsUnit: =:=[SECURITY_INPUT, Unit]): Full[Unit, Unit, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

    Like serverLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

    Like serverLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

    Definition Classes
    EndpointServerLogicOps
  72. def serverLogicRecoverErrors[F[_]](f: (INPUT) ⇒ F[OUTPUT])(implicit eIsThrowable: <:<[ERROR_OUTPUT, Throwable], eClassTag: ClassTag[ERROR_OUTPUT], aIsUnit: =:=[SECURITY_INPUT, Unit]): Full[Unit, Unit, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

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

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

    Definition Classes
    EndpointServerLogicOps
  73. def serverLogicSuccess[F[_]](f: (INPUT) ⇒ F[OUTPUT])(implicit aIsUnit: =:=[SECURITY_INPUT, Unit]): Full[Unit, Unit, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

    Like serverLogic, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to I => F[O].

    Like serverLogic, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to I => F[O].

    Definition Classes
    EndpointServerLogicOps
  74. def serverSecurityLogic[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[Either[ERROR_OUTPUT, PRINCIPAL]]): PartialServerEndpoint[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

    Combine this endpoint description with a function, which implements the security logic of the endpoint.

    Combine this endpoint description with a function, which implements the security logic of the endpoint.

    Subsequently, the endpoint inputs and outputs can be extended (for error outputs, new variants can be added, but they cannot be arbitrarily extended). Then the main server logic can be provided, given a function which accepts as arguments the result of the security logic 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).

    An example use-case is defining an endpoint with fully-defined errors, and with security logic built-in. Such an endpoint can be then extended by multiple other endpoints, by specifying different inputs, outputs and the main logic.

    Definition Classes
    EndpointServerLogicOps
  75. def serverSecurityLogicError[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[ERROR_OUTPUT]): PartialServerEndpoint[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

    Like serverSecurityLogic, but specialised to the case when the result is always an error (Left), hence when the logic type can be simplified to A => F[E].

    Like serverSecurityLogic, but specialised to the case when the result is always an error (Left), hence when the logic type can be simplified to A => F[E].

    Definition Classes
    EndpointServerLogicOps
  76. def serverSecurityLogicOption[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[Option[PRINCIPAL]])(implicit eIsUnit: =:=[ERROR_OUTPUT, Unit]): PartialServerEndpoint[SECURITY_INPUT, PRINCIPAL, INPUT, Unit, OUTPUT, R, F]

    Like serverSecurityLogic, but specialised to the case when the error type is Unit (e.g.

    Like serverSecurityLogic, but specialised to the case when the error type is Unit (e.g. a fixed status code), and the result of the logic function is an option. A None is then treated as an error response.

    Definition Classes
    EndpointServerLogicOps
  77. def serverSecurityLogicOptionWithOutput[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[Option[(OUTPUT, PRINCIPAL)]])(implicit eIsUnit: =:=[ERROR_OUTPUT, Unit]): PartialServerEndpointWithSecurityOutput[SECURITY_INPUT, PRINCIPAL, INPUT, Unit, OUTPUT, Unit, R, F]

    Like serverSecurityLogicWithOutput, but specialised to the case when the error type is Unit (e.g.

    Like serverSecurityLogicWithOutput, but specialised to the case when the error type is Unit (e.g. a fixed status code), and the result of the logic function is an option. A None is then treated as an error response.

    Definition Classes
    EndpointServerLogicOps
  78. def serverSecurityLogicPure[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ Either[ERROR_OUTPUT, PRINCIPAL]): PartialServerEndpoint[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

    Like serverSecurityLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

    Like serverSecurityLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

    Definition Classes
    EndpointServerLogicOps
  79. def serverSecurityLogicPureWithOutput[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ Either[ERROR_OUTPUT, (OUTPUT, PRINCIPAL)]): PartialServerEndpointWithSecurityOutput[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, Unit, R, F]

    Like serverSecurityLogicWithOutput, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

    Like serverSecurityLogicWithOutput, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

    Definition Classes
    EndpointServerLogicOps
  80. def serverSecurityLogicRecoverErrors[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[PRINCIPAL])(implicit eIsThrowable: <:<[ERROR_OUTPUT, Throwable], eClassTag: ClassTag[ERROR_OUTPUT]): PartialServerEndpoint[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

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

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

    Definition Classes
    EndpointServerLogicOps
  81. def serverSecurityLogicRecoverErrorsWithOutput[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[(OUTPUT, PRINCIPAL)])(implicit eIsThrowable: <:<[ERROR_OUTPUT, Throwable], eClassTag: ClassTag[ERROR_OUTPUT]): PartialServerEndpointWithSecurityOutput[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, Unit, R, F]

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

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

    Definition Classes
    EndpointServerLogicOps
  82. def serverSecurityLogicSuccess[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[PRINCIPAL]): PartialServerEndpoint[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, R, F]

    Like serverSecurityLogic, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to A => F[PRINCIPAL].

    Like serverSecurityLogic, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to A => F[PRINCIPAL].

    Definition Classes
    EndpointServerLogicOps
  83. def serverSecurityLogicSuccessWithOutput[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[(OUTPUT, PRINCIPAL)]): PartialServerEndpointWithSecurityOutput[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, Unit, R, F]

    Like serverSecurityLogicWithOutput, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to A => F[(O, PRINCIPAL)].

    Like serverSecurityLogicWithOutput, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to A => F[(O, PRINCIPAL)].

    Definition Classes
    EndpointServerLogicOps
  84. def serverSecurityLogicWithOutput[PRINCIPAL, F[_]](f: (SECURITY_INPUT) ⇒ F[Either[ERROR_OUTPUT, (OUTPUT, PRINCIPAL)]]): PartialServerEndpointWithSecurityOutput[SECURITY_INPUT, PRINCIPAL, INPUT, ERROR_OUTPUT, OUTPUT, Unit, R, F]

    Like serverSecurityLogic, but allows the security function to contribute to the overall output of the endpoint.

    Like serverSecurityLogic, but allows the security function to contribute to the overall output of the endpoint. A value for the complete output O defined so far has to be provided. The value PRINCIPAL will be propagated as an input to the regular logic.

    Definition Classes
    EndpointServerLogicOps
  85. 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.). E.g.: POST /books /add {header Authorization} {body as application/json (UTF-8)} -> {body as text/plain (UTF-8)}/-

    Definition Classes
    EndpointMetaOps
  86. 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. E.g.:

    Endpoint(securityin: -, in: /books POST /add {body as application/json (UTF-8)} {header Authorization}, errout: {body as text/plain (UTF-8)}, out: -)
    Definition Classes
    EndpointMetaOps
  87. def showPathTemplate(showPathParam: (Int, PathCapture[_]) ⇒ String = ..., showQueryParam: Option[(Int, Query[_]) ⇒ String] = ..., includeAuth: Boolean = true, showNoPathAs: String = "*", showPathsAs: Option[String] = Some("*"), showQueryParamsAs: Option[String] = Some("*")): String

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

    Shows 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.

    showNoPathAs

    How to show the path if the endpoint does not define any path inputs.

    showPathsAs

    How to show Tapir.paths inputs (if at all), which capture multiple paths segments

    showQueryParamsAs

    How to show Tapir.queryParams inputs (if at all), which capture multiple query parameters

    Definition Classes
    EndpointMetaOps
  88. def showRaw: String

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

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

    Definition Classes
    EndpointMetaOps
  89. def showShort: String

    Shortened information about the endpoint.

    Shortened information about the endpoint. If the endpoint is named, returns the name, e.g. [my endpoint]. Otherwise, returns the string representation of the method (if any) and path, e.g. POST /books/add

    Definition Classes
    EndpointMetaOps
  90. def showType: String
    Attributes
    protected
    Definition Classes
    EndpointEndpointMetaOps
  91. def summary(s: String): ThisType[R]
    Definition Classes
    EndpointInfoOps
  92. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  93. def tag(t: String): ThisType[R]

    Append t to the existing tags.

    Append t to the existing tags.

    Definition Classes
    EndpointInfoOps
  94. def tags(ts: List[String]): ThisType[R]

    Append ts to the existing tags.

    Append ts to the existing tags.

    Definition Classes
    EndpointInfoOps
  95. def trace: EndpointType[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
    Definition Classes
    EndpointInputsOps
  96. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  97. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  98. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  99. def withTag(t: String): ThisType[R]

    Overwrite the existing tags with a single tag t.

    Overwrite the existing tags with a single tag t.

    Definition Classes
    EndpointInfoOps
  100. def withTags(ts: List[String]): ThisType[R]

    Overwrite the existing tags with ts.

    Overwrite the existing tags with ts.

    Definition Classes
    EndpointInfoOps
  101. def withoutTags: ThisType[R]

    Remove all tags from this endpoint.

    Remove all tags from this endpoint.

    Definition Classes
    EndpointInfoOps

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 Serializable

Inherited from Product

Inherited from Equals

Inherited from EndpointServerLogicOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointMetaOps

Inherited from EndpointInfoOps[R]

Inherited from EndpointOutputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointOutputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointErrorOutputVariantsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointErrorOutputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointErrorOutputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointInputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointInputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointSecurityInputsOps[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from EndpointSecurityInputsMacros[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]

Inherited from AnyRef

Inherited from Any

Ungrouped